[SCM] WebKit Debian packaging branch, debian/unstable, updated. upstream/1.1.20-241-g73d16d1

Gustavo Noronha Silva kov at debian.org
Thu Feb 4 22:26:41 UTC 2010


The following commit has been merged in the debian/unstable branch:
commit 73d16d19582a88e67b4c7adfb3cca74bc3741197
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Feb 4 19:29:19 2010 +0000

    2010-02-04  Gustavo Noronha Silva  <gustavo.noronha at collabora.co.uk>
    
            Reviewed by Xan Lopez.
    
            [GTK] Crashes when an invalid hostname is pre-fetched
            https://bugs.webkit.org/show_bug.cgi?id=34602
    
            * http/tests/misc/dns-prefetch-control-expected.txt:
            * http/tests/misc/dns-prefetch-control.html: Add broken hostname test case.
    2010-02-04  Gustavo Noronha Silva  <gustavo.noronha at collabora.co.uk>
    
            Reviewed by Xan Lopez.
    
            [GTK] Crashes when an invalid hostname is pre-fetched
            https://bugs.webkit.org/show_bug.cgi?id=34602
    
            * platform/network/soup/DNSSoup.cpp:
            (WebCore::prefetchDNS): NULL-check the SoupURI that is created
            from the hostname; that will happen for invalid hostnames.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54359 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/platform/network/soup/DNSSoup.cpp b/WebCore/platform/network/soup/DNSSoup.cpp
index ce55143..df0d20a 100644
--- a/WebCore/platform/network/soup/DNSSoup.cpp
+++ b/WebCore/platform/network/soup/DNSSoup.cpp
@@ -28,18 +28,21 @@
 #include "DNS.h"
 
 #include "CString.h"
+#include "GOwnPtrGtk.h"
 #include "ResourceHandle.h"
 
 namespace WebCore {
 
 void prefetchDNS(const String& hostname)
 {
-    #ifdef HAVE_LIBSOUP_2_29_3
+#ifdef HAVE_LIBSOUP_2_29_3
     String uri = "http://"+hostname;
-    SoupURI* soupUri = soup_uri_new(uri.utf8().data());
-    soup_session_prepare_for_uri(ResourceHandle::defaultSession(), soupUri);
-    soup_uri_free(soupUri);
-    #endif
+    GOwnPtr<SoupURI> soupURI(soup_uri_new(uri.utf8().data()));
+    // We may get invalid hostnames, so NULL-check here.
+    if (!soupURI)
+        return;
+    soup_session_prepare_for_uri(ResourceHandle::defaultSession(), soupURI.get());
+#endif
 }
 
 }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list