[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:07 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit cc8cad43c5b1fa502b5d3ddbaf1354bf61d59f79
Author: kocienda <kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Aug 5 17:33:36 2003 +0000

            Reviewed by Maciej
    
    	In KWQKURL.mm, we copy the contents of a URL path from a source buffer
    	to a destination buffer. In the loop, we often access dst[-1]. It was
    	not entirely clear that this did not underrun the buffer. Upon further
    	inspection, it seems clear that it does not, but this small change
    	makes this more clear, and adds an assertion that all is well with
    	regard to indexing into the dst buffer.
    
            * kwq/KWQKURL.mm:
            (copyPathRemovingDots)
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4767 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 00ce21a..194c289 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,17 @@
+2003-08-05  Ken Kocienda  <kocienda at apple.com>
+
+        Reviewed by Maciej
+
+	In KWQKURL.mm, we copy the contents of a URL path from a source buffer
+	to a destination buffer. In the loop, we often access dst[-1]. It was
+	not entirely clear that this did not underrun the buffer. Upon further
+	inspection, it seems clear that it does not, but this small change
+	makes this more clear, and adds an assertion that all is well with
+	regard to indexing into the dst buffer.
+
+        * kwq/KWQKURL.mm:
+        (copyPathRemovingDots)
+
 2003-08-01  Richard Williamson   <rjw at apple.com>
 
 	Fixed 3095376.  Implemented correct selection behavior for rtl scripts.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 00ce21a..194c289 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,17 @@
+2003-08-05  Ken Kocienda  <kocienda at apple.com>
+
+        Reviewed by Maciej
+
+	In KWQKURL.mm, we copy the contents of a URL path from a source buffer
+	to a destination buffer. In the loop, we often access dst[-1]. It was
+	not entirely clear that this did not underrun the buffer. Upon further
+	inspection, it seems clear that it does not, but this small change
+	makes this more clear, and adds an assertion that all is well with
+	regard to indexing into the dst buffer.
+
+        * kwq/KWQKURL.mm:
+        (copyPathRemovingDots)
+
 2003-08-01  Richard Williamson   <rjw at apple.com>
 
 	Fixed 3095376.  Implemented correct selection behavior for rtl scripts.
diff --git a/WebCore/kwq/KWQKURL.mm b/WebCore/kwq/KWQKURL.mm
index 7fdfe68..6bbbf54 100644
--- a/WebCore/kwq/KWQKURL.mm
+++ b/WebCore/kwq/KWQKURL.mm
@@ -834,7 +834,16 @@ static int copyPathRemovingDots(char *dst, const char *src, int srcStart, int sr
     const char *baseStringEnd = src + srcEnd;
     char *bufferPathStart = dst;
     const char *baseStringPos = baseStringStart;
-    
+
+    // this code is unprepared for paths that do not begin with a slash 
+    // and we should always have one in the source string
+    ASSERT(baseStringPos[0] == '/');
+
+    // copy the leading slash into the destination
+    *dst = *baseStringPos;
+    baseStringPos++;
+    dst++;
+
     while (baseStringPos < baseStringEnd) {
         if (baseStringPos[0] == '.' && dst[-1] == '/') {
             if (baseStringPos[1] == '/' || baseStringPos + 1 == baseStringEnd) {

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list