[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.20-204-g221d8e8

eric at webkit.org eric at webkit.org
Wed Feb 10 22:14:27 UTC 2010


The following commit has been merged in the webkit-1.1 branch:
commit 29b323787569f640b7eff52461592e395ae92a8d
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/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 09fb3d4..8c3a15b 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
+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  Brian Weinstein  <bweinstein at apple.com>
 
         Rubber-stamped by Dan Bernstein.
diff --git a/LayoutTests/http/tests/misc/dns-prefetch-control-expected.txt b/LayoutTests/http/tests/misc/dns-prefetch-control-expected.txt
index f5ab8b1..f16afa8 100644
--- a/LayoutTests/http/tests/misc/dns-prefetch-control-expected.txt
+++ b/LayoutTests/http/tests/misc/dns-prefetch-control-expected.txt
@@ -2,7 +2,7 @@ This is a test of DNS prefetch control. It's considered a pass if it doesn't cra
 
 The following frames contain links that are expected to trigger a DNS prefetch.
 
-            
+              
 The following frames contain links that are not expected to cause a DNS prefetch.
 
           
diff --git a/LayoutTests/http/tests/misc/dns-prefetch-control.html b/LayoutTests/http/tests/misc/dns-prefetch-control.html
index b24b477..ad42c42 100644
--- a/LayoutTests/http/tests/misc/dns-prefetch-control.html
+++ b/LayoutTests/http/tests/misc/dns-prefetch-control.html
@@ -24,6 +24,12 @@
         contents += "<a href='" + scheme + "//" + host + "'>" + host + "</a>";
         emitFrameWithContents(contents);
     }
+    function emitFrameForHost(host) 
+    {
+        var contents = "<meta http-equiv='x-dns-prefetch-control' content='on'>";
+        contents += "<a href='http:" + "//" + host + "'>" + host + "</a>";
+        emitFrameWithContents(contents);
+    }
     function emitFrameForManualDNSPrefetch(dnsPrefetchControl) 
     {
         var host = getRandomHost();
@@ -46,6 +52,7 @@ a manual test of DNS prefetch using a networking monitoring tool.</p>
   <script>emitFrameForScheme("http:")</script>
   <script>emitFrameForScheme("https:")</script>
   <script>emitFrameForScheme("ftp:")</script>
+  <script>emitFrameForHost("%")</script>
   <iframe src="resources/dns-prefetch-control.php"></iframe>
   <iframe src="resources/dns-prefetch-control.php?value=on"></iframe>
   <iframe src="https://127.0.0.1:8443/misc/resources/dns-prefetch-control.php?value=on"></iframe>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 7d2b924..7f1416d 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,14 @@
+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.
+
 2010-02-04  José Millán Soto  <jmillan at igalia.com>
 
         Reviewed by Xan Lopez.
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