[gnome-settings-daemon] wacom: Fix possible crasher
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] wacom: Fix possible crasher
- Date: Fri, 7 Oct 2011 12:10:37 +0000 (UTC)
commit 1123e8cba7620a3b79f13ae5909c33f40d5312cc
Author: Bastien Nocera <hadess hadess net>
Date: Fri Oct 7 13:08:57 2011 +0100
wacom: Fix possible crasher
If XListInputDevices() fails, the number of devices could
be positive, and cause a crash.
https://bugzilla.gnome.org/show_bug.cgi?id=661170
plugins/wacom/gsd-wacom-manager.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/plugins/wacom/gsd-wacom-manager.c b/plugins/wacom/gsd-wacom-manager.c
index 2965e97..a51a505 100644
--- a/plugins/wacom/gsd-wacom-manager.c
+++ b/plugins/wacom/gsd-wacom-manager.c
@@ -237,6 +237,8 @@ wacom_set_property (WacomType wacom_type,
gint i;
device_info = XListInputDevices (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), &n_devices);
+ if (device_info == NULL)
+ return;
for (i = 0; i < n_devices; i++) {
XDevice *device = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]