[gnome-control-center/gnome-3-14] printers: avoid crashes when searching for printers w/ special chars
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/gnome-3-14] printers: avoid crashes when searching for printers w/ special chars
- Date: Mon, 14 Sep 2015 18:52:40 +0000 (UTC)
commit 987eb850eb69be22b1d7c14079d4dd34d7ab0ba1
Author: Felipe Borges <feborges redhat com>
Date: Thu Sep 3 13:16:37 2015 +0200
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.
https://bugzilla.gnome.org/show_bug.cgi?id=754248
panels/printers/pp-new-printer-dialog.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/panels/printers/pp-new-printer-dialog.c b/panels/printers/pp-new-printer-dialog.c
index 2d731ef..e57453e 100644
--- a/panels/printers/pp-new-printer-dialog.c
+++ b/panels/printers/pp-new-printer-dialog.c
@@ -1368,7 +1368,11 @@ parse_uri (const gchar *uri,
*port = atoi (position + 1);
}
- *host = resulting_host;
+ *host = g_uri_unescape_string (resulting_host,
+ G_URI_RESERVED_CHARS_GENERIC_DELIMITERS
+ G_URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS);
+
+ g_free (resulting_host);
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]