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 783406 - printers: Check if printer name is NULL
printers: Check if printer name is NULL
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Printers
unspecified
Other All
: Normal normal
: ---
Assigned To: Marek Kašík
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-06-04 14:56 UTC by Mohammed Sadiq
Modified: 2017-06-23 11:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
printers: Check if printer name is NULL (1.67 KB, patch)
2017-06-04 14:56 UTC, Mohammed Sadiq
committed Details | Review

Description Mohammed Sadiq 2017-06-04 14:56:49 UTC
.
Comment 1 Mohammed Sadiq 2017-06-04 14:56:59 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
Comment 2 Felipe Borges 2017-06-05 07:57:26 UTC
Review of attachment 353144 [details] [review]:

Sure. Thanks for your patch.