[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

kocienda kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:50:39 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit f4afbcba01729c058eeb7f39fe0bf05ac7fb6f49
Author: kocienda <kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Aug 7 21:07:01 2003 +0000

           Reviewed by Darin
    
           Fix for this bug:
    
           <rdar://problem/3367434>: newly-added KURL assertion failing reproducibly for JavaScript URL (www.thai.com)
    
           The assertion is correct. The issue was in calling the function
           with bad input. Non-hierarchical URLs should not have their "path"
           elements submitted to a function that will replace dots.
    
           The fix is to avoid calling this function with such non-hierarchical
           URLs.
    
             * kwq/KWQKURL.mm:
             (KURL::parse)
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4787 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 1eba767..0378064 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,5 +1,23 @@
 2003-08-07  Ken Kocienda  <kocienda at apple.com>
 
+       Reviewed by Darin
+
+       Fix for this bug:
+
+       <rdar://problem/3367434>: newly-added KURL assertion failing reproducibly for JavaScript URL (www.thai.com)
+
+       The assertion is correct. The issue was in calling the function
+       with bad input. Non-hierarchical URLs should not have their "path"
+       elements submitted to a function that will replace dots.
+
+       The fix is to avoid calling this function with such non-hierarchical
+       URLs.
+
+         * kwq/KWQKURL.mm:
+         (KURL::parse)
+
+2003-08-07  Ken Kocienda  <kocienda at apple.com>
+
         Reviewed by Maciej
 
 	There was a bug in this code that caused a relative URL that was
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 1eba767..0378064 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,5 +1,23 @@
 2003-08-07  Ken Kocienda  <kocienda at apple.com>
 
+       Reviewed by Darin
+
+       Fix for this bug:
+
+       <rdar://problem/3367434>: newly-added KURL assertion failing reproducibly for JavaScript URL (www.thai.com)
+
+       The assertion is correct. The issue was in calling the function
+       with bad input. Non-hierarchical URLs should not have their "path"
+       elements submitted to a function that will replace dots.
+
+       The fix is to avoid calling this function with such non-hierarchical
+       URLs.
+
+         * kwq/KWQKURL.mm:
+         (KURL::parse)
+
+2003-08-07  Ken Kocienda  <kocienda at apple.com>
+
         Reviewed by Maciej
 
 	There was a bug in this code that caused a relative URL that was
diff --git a/WebCore/kwq/KWQKURL.mm b/WebCore/kwq/KWQKURL.mm
index 80aa146..0e9d6e6 100644
--- a/WebCore/kwq/KWQKURL.mm
+++ b/WebCore/kwq/KWQKURL.mm
@@ -1015,26 +1015,40 @@ void KURL::parse(const char *url, const QString *originalString)
 	
     int pathStart = portEnd;
     int pathEnd = pathStart;
-    while (url[pathEnd] != '\0' && url[pathEnd] != '?' && url[pathEnd] != '#') {
-        pathEnd++;
-    }
-
-    int queryStart = pathEnd;
-    int queryEnd = queryStart;
-    if (url[queryStart] == '?') {
-        while (url[queryEnd] != '\0' && url[queryEnd] != '#') {
-            queryEnd++;
+    int queryStart;
+    int queryEnd;
+    int fragmentStart;
+    int fragmentEnd;
+
+    if (!hierarchical) {
+        while (url[pathEnd] != '\0') {
+            pathEnd++;
         }
+    	queryStart = queryEnd = pathEnd;
+    	fragmentStart = fragmentEnd = pathEnd;
     }
-
-    int fragmentStart = queryEnd;
-    int fragmentEnd = fragmentStart;
-    if (url[fragmentStart] == '#') {
-	fragmentStart++;
-	fragmentEnd = fragmentStart;
-	while(url[fragmentEnd] != '\0') {
-	    fragmentEnd++;
-	}
+    else {
+        while (url[pathEnd] != '\0' && url[pathEnd] != '?' && url[pathEnd] != '#') {
+            pathEnd++;
+        }
+    
+        queryStart = pathEnd;
+        queryEnd = queryStart;
+        if (url[queryStart] == '?') {
+            while (url[queryEnd] != '\0' && url[queryEnd] != '#') {
+                queryEnd++;
+            }
+        }
+        
+        fragmentStart = queryEnd;
+        fragmentEnd = fragmentStart;
+        if (url[fragmentStart] == '#') {
+            fragmentStart++;
+            fragmentEnd = fragmentStart;
+            while(url[fragmentEnd] != '\0') {
+                fragmentEnd++;
+            }
+        }
     }
 
     // assemble it all, remembering the real ranges
@@ -1164,7 +1178,7 @@ void KURL::parse(const char *url, const QString *originalString)
        
     // add path, escaping bad characters
     
-    if (strstr(url, "/.") || strstr(url, "..")) {
+    if (hierarchical && (strstr(url, "/.") || strstr(url, ".."))) {
         char static_path_buffer[4096];
         char *path_buffer;
         uint pathBufferLength = pathEnd - pathStart + 1;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list