diff options
author | Marek Kasik <mkasik@redhat.com> | 2015-05-26 16:34:39 +0200 |
---|---|---|
committer | Marek Kasik <mkasik@redhat.com> | 2015-07-13 11:21:53 +0200 |
commit | b02f7722dd1a1ba921bc318660546d58757229c0 (patch) | |
tree | fc8596cfec0d663b614234566b592abcaf71b5fc /panels | |
parent | 61a0a8c633b39f56adbdca6ff9655f6815c5f66d (diff) | |
download | gnome-control-center-b02f7722dd1a1ba921bc318660546d58757229c0.tar.gz |
printers: Check whether we have a device name
Check whether we've been able to find a usable name of given device
to avoid dereference of NULL in canonicalize_device_name().
https://bugzilla.gnome.org/show_bug.cgi?id=749896
Diffstat (limited to 'panels')
-rw-r--r-- | panels/printers/pp-utils.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/panels/printers/pp-utils.c b/panels/printers/pp-utils.c index 85d68ab72..ac2b9dd33 100644 --- a/panels/printers/pp-utils.c +++ b/panels/printers/pp-utils.c @@ -4161,6 +4161,9 @@ canonicalize_device_name (GList *devices, name = g_strdup (device->device_info); } + if (name == NULL) + return NULL; + g_strstrip (name); g_strcanon (name, ALLOWED_CHARACTERS, '-'); |