]> spindle.queued.net Git - midori/commitdiff
Dont crash on unvalid geo: links
authorAlexander Butenko <a.butenka@gmail.com>
Sun, 3 Jul 2011 16:17:16 +0000 (12:17 -0400)
committerChristian Dywan <christian@twotoasts.de>
Mon, 4 Jul 2011 21:42:24 +0000 (23:42 +0200)
Fixes: https://bugs.launchpad.net/midori/+bug/804866
midori/midori-view.c

index 7b76dbeb01be53e2618995d4d2aeda6a3c816c37..e5edf1cd4f6d380d1f50d9c443395b6b154a0f31 100644 (file)
@@ -862,7 +862,7 @@ midori_view_web_view_navigation_decision_cb (WebKitWebView*             web_view
     JSContextRef js_context;
     gchar* result;
     const gchar* uri = webkit_network_request_get_uri (request);
-    if (g_str_has_prefix (uri, "geo:"))
+    if (g_str_has_prefix (uri, "geo:") && strstr (uri, ","))
     {
         gchar* new_uri = sokoke_magic_uri (uri);
         midori_view_set_uri (view, new_uri);