[gnome-settings-daemon] wacom: Fix NULL pointer dereference
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] wacom: Fix NULL pointer dereference
- Date: Wed, 25 Jan 2012 12:31:20 +0000 (UTC)
commit 617fe8512cfb3e5491785b4375785f08c8996a84
Author: Jason Gerecke <killertofu gmail com>
Date: Mon Jan 23 15:37:30 2012 -0800
wacom: Fix NULL pointer dereference
If the public gsd_wacom_device_get_display_monitor function is
called, it eventually finds its way up here. With a NULL 'device'
argument, we segfault rather than gracefully returning NULL as
other exceptional conditions in the function do.
https://bugzilla.gnome.org/show_bug.cgi?id=668545
plugins/wacom/gsd-wacom-device.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/plugins/wacom/gsd-wacom-device.c b/plugins/wacom/gsd-wacom-device.c
index 062e0cf..04b5305 100644
--- a/plugins/wacom/gsd-wacom-device.c
+++ b/plugins/wacom/gsd-wacom-device.c
@@ -480,6 +480,9 @@ find_output_by_display (GsdWacomDevice *device)
GVariant *display;
const gchar **edid;
+ if (device == NULL)
+ return NULL;
+
tablet = device->priv->wacom_settings;
display = g_settings_get_value (tablet, "display");
edid = g_variant_get_strv (display, &n);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]