From 9681d7e75f2d1296a890bfa64b3478ea7025df62 Mon Sep 17 00:00:00 2001 From: Ryan Lortie Date: Wed, 18 Nov 2009 18:43:30 -0600 Subject: [PATCH] =?utf8?q?Bug=C2=A0595138=20-=20GFile=20not=20robust=20wit?= =?utf8?q?h=20invalid=20input?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Improve handling of g_file_query_default_handler() when called on an invalid GFile (ie: one created with an invalid URI). --- gio/gfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gio/gfile.c b/gio/gfile.c index 36c0439..ceaf802 100644 --- a/gio/gfile.c +++ b/gio/gfile.c @@ -5999,7 +5999,7 @@ g_file_query_default_handler (GFile *file, char *path; uri_scheme = g_file_get_uri_scheme (file); - if (uri_scheme) + if (uri_scheme && uri_scheme[0] != '\0') { appinfo = g_app_info_get_default_for_uri_scheme (uri_scheme); g_free (uri_scheme); -- 2.7.4