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 689265 - wacom: crash when downgrading control-center
wacom: crash when downgrading control-center
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Wacom
3.7.x
Other Linux
: Normal normal
: ---
Assigned To: Olivier Fourdan
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-11-29 11:06 UTC by Olivier Fourdan
Modified: 2012-12-20 10:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch (1.53 KB, patch)
2012-11-29 11:17 UTC, Olivier Fourdan
committed Details | Review

Description Olivier Fourdan 2012-11-29 11:06:43 UTC
Action type comes from GSettings and may have been changed to some invalid value, causing a segmentation fault in control-center if the value is larger than the known action types.

This can also occur when downgrading from a version with more possible actions.
Comment 1 Olivier Fourdan 2012-11-29 11:17:18 UTC
Created attachment 230174 [details] [review]
Proposed patch
Comment 2 Bastien Nocera 2012-12-14 14:34:30 UTC
Review of attachment 230174 [details] [review]:

::: panels/wacom/cc-wacom-page.c
@@ +614,3 @@
 
+	/* Sanity check */
+	if (type >= G_N_ELEMENTS(action_table))

I'd rather a:
type = sanity_check_action_type (type);

And expand on what the code is trying to fix in the function.