GNOME Bugzilla – Bug 754248
Add new printer dialog crashes when you put '%' in it
Last modified: 2015-09-15 09:43:50 UTC
When you try to add a new printer, if the name contains '%', it will crash immediately. We have a network printer named "SafeCom Unix" We use the whole URI to find it like : smb://ipaddress/SafeCom%20Unix Right after inserting '%', the dialog crashes.
Thanks for taking the time to report this. Without a stack trace from the crash it's very hard to determine what caused it. Can you get us a stack trace and mention which version of gnome-control-center you're using? Please see https://wiki.gnome.org/Community/GettingInTouch/Bugzilla/GettingTraces for more information on how to do so. When pasting a stack trace in this bug report, please reset the status of this bug report from NEEDINFO to its previous status. Thanks in advance!
putting crashes on the blocker list for now - although I haven't been able to reproduce this in quick testing.
I'm using gnome-control-center 3.16.2 on fedora 22. Here is the stack trace : (gdb) bt full
+ Trace 235408
Semms I cannot change the status of the bug to anything other than resolved!
(In reply to Hamid Noroozi from comment #3) > I'm using gnome-control-center 3.16.2 on fedora 22. > > Here is the stack trace : Can you please install at least glib2-debuginfo and control-center-debuginfo (make sure the versions match what you have installed).
Created attachment 310583 [details] [review] printers: avoid crashes when searching for printers w/ special chars Since the dialog considers just the hostname part from the URL, unespacing the url avoids a backend crash.
(In reply to Felipe Borges from comment #6) > Created attachment 310583 [details] [review] [review] > printers: avoid crashes when searching for printers w/ special chars > > Since the dialog considers just the hostname part from the URL, > unespacing the url avoids a backend crash. A reproducer would be useful.
To reproduce it, just click the + button to add a new printer and type the % symbol at the search entry box.
(In reply to Felipe Borges from comment #8) > To reproduce it, just click the + button to add a new printer and type the % > symbol at the search entry box. Right, that crashes, the example in comment 0 didn't.
Review of attachment 310583 [details] [review]: That looks fine. Please cherry-pick as necessary to master, gnome-3-16 and gnome-3-14.
You are leaking the "resulting_host" string in the patch.
Review of attachment 310583 [details] [review]: As Marek mentioned, it's leaking the "resulting_host" string.
Created attachment 311291 [details] [review] printers: avoid crashes when searching for printers w/ special chars Since the dialog considers just the hostname part from the URL, unespacing the url avoids a backend crash.
Review of attachment 311291 [details] [review]: Please request a freeze break, and commit to master for GNOME 3.18 and backport as required.