GNOME Bugzilla – Bug 783406
printers: Check if printer name is NULL
Last modified: 2017-06-23 11:33:40 UTC
.
Created attachment 353144 [details] [review] printers: Check if printer name is NULL This was causing a segfault when the user clicks the cancel button on add new printer dialog (in case when no printers are listed, and no printers are added). output from sanitizer: ==22669==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7fe1c7a4d409 bp 0x7ffd179f6410 sp 0x7ffd179f6410 T0) #0 0x7fe1c7a4d408 in g_str_hash /home/sadiq/jhbuild/checkout/glib/glib/ghash.c:1882 #1 0x7fe1c7a4c814 in g_hash_table_lookup_node /home/sadiq/jhbuild/checkout/glib/glib/ghash.c:379 #2 0x7fe1c7a4c814 in g_hash_table_lookup /home/sadiq/jhbuild/checkout/glib/glib/ghash.c:1153 #3 0x55cef023a121 in new_printer_dialog_response_cb /home/sadiq/jhbuild/checkout/gnome-control-center/panels/printers/cc-printers-panel.c:914
Review of attachment 353144 [details] [review]: Sure. Thanks for your patch.