After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 749882 - Fix coverity scan bugs
Fix coverity scan bugs
Status: RESOLVED FIXED
Product: gnome-settings-daemon
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
Depends on:
Blocks:
 
 
Reported: 2015-05-26 10:03 UTC by Bastien Nocera
Modified: 2015-05-27 09:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
wacom: Fix freeing buffer in OLED helper (1.29 KB, patch)
2015-05-26 10:03 UTC, Bastien Nocera
committed Details | Review
wacom: Fix possible double-free in LED helper (1.54 KB, patch)
2015-05-26 10:04 UTC, Bastien Nocera
committed Details | Review
power: Fix invalid error access (1.05 KB, patch)
2015-05-26 10:04 UTC, Bastien Nocera
committed Details | Review

Description Bastien Nocera 2015-05-26 10:03:56 UTC
.
Comment 1 Bastien Nocera 2015-05-26 10:03:59 UTC
Created attachment 303979 [details] [review]
wacom: Fix freeing buffer in OLED helper

We can't free "", buffer needs to be set by the command-line options,
but we never check that it got set.

From coverity:
gnome-settings-daemon-3.14.4/plugins/wacom/gsd-wacom-oled-helper.c:415: incorrect_free: "g_free" frees incorrect pointer "buffer".
Comment 2 Bastien Nocera 2015-05-26 10:04:04 UTC
Created attachment 303980 [details] [review]
wacom: Fix possible double-free in LED helper

From coverity:
gnome-settings-daemon-3.14.4/plugins/wacom/gsd-wacom-led-helper.c:130: double_free: Calling "g_free" frees pointer "status" which has already been freed.
Comment 3 Bastien Nocera 2015-05-26 10:04:08 UTC
Created attachment 303981 [details] [review]
power: Fix invalid error access

From coverity:
gnome-settings-daemon-3.14.4/plugins/power/gpm-common.c:321:52: warning: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error')
Comment 4 Rui Matos 2015-05-26 17:28:02 UTC
Review of attachment 303979 [details] [review]:

++
Comment 5 Rui Matos 2015-05-26 17:29:17 UTC
Review of attachment 303980 [details] [review]:

++
Comment 6 Rui Matos 2015-05-26 17:30:07 UTC
Review of attachment 303981 [details] [review]:

++
Comment 7 Bastien Nocera 2015-05-27 09:04:39 UTC
Attachment 303979 [details] pushed as 8ec4957 - wacom: Fix freeing buffer in OLED helper
Attachment 303980 [details] pushed as 5d66158 - wacom: Fix possible double-free in LED helper
Attachment 303981 [details] pushed as 15029f1 - power: Fix invalid error access