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 568713 - g-s-d xrandr plugin crashes in handle_fn_f7 because of wrong error handling
g-s-d xrandr plugin crashes in handle_fn_f7 because of wrong error handling
Status: RESOLVED FIXED
Product: gnome-settings-daemon
Classification: Core
Component: plugins
2.25.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
: 566287 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-01-22 15:55 UTC by Andres Freund
Modified: 2009-01-24 13:14 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26


Attachments
Simple fix for the error handling issue. (620 bytes, patch)
2009-01-22 15:57 UTC, Andres Freund
committed Details | Review

Description Andres Freund 2009-01-22 15:55:52 UTC
g-s-d
does 

if (!gnome_rr_screen_refresh (screen, &error){
     str = g_strdup_printf (_("Could not refresh the screen information: %s"), error->message);

in handle_fn_f7

but the documentation of gnome_rr_screen_refresh states:
Returns : 	 TRUE if the screen's configuration changed; otherwise, the function returns FALSE and a NULL error if the configuration didn't change, or FALSE and a non-NULL error if there was an error while refreshing the configuration.

Though this error gets dereferenced while beeing NULL.


Thanks, Andres
Comment 1 Andres Freund 2009-01-22 15:57:09 UTC
Created attachment 127006 [details] [review]
Simple fix for the error handling issue.

This fixes the issue locally for me (ubuntu jaunty).
Comment 2 Jens Granseuer 2009-01-24 11:40:43 UTC
Thanks!

2009-01-24  Jens Granseuer  <...>

        Patch by: Andres Freund <...>

        Fix possible crash when pressing Fn-F7 (bug #568713)

        * plugins/xrandr/gsd-xrandr-manager.c: (handle_fn_f7): only try to
        dereference the error when it was actually set
Comment 3 Jens Granseuer 2009-01-24 13:14:07 UTC
*** Bug 566287 has been marked as a duplicate of this bug. ***