[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

abarth at webkit.org abarth at webkit.org
Wed Dec 22 14:54:00 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit ed3931179577ae396b2b4a7d334bbeb9f6b075f8
Author: abarth at webkit.org <abarth at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sat Oct 23 16:48:02 2010 +0000

    2010-10-23  Adam Barth  <abarth at webkit.org>
    
            Reviewed by Andreas Kling.
    
            WebP decoding hits ASSERT
            https://bugs.webkit.org/show_bug.cgi?id=48168
    
            Calling reserveCapacity only allocates the memory.  It doesn't actually
            set the length.  When you try to access the zeroth element, you hit an
            ASSERT.
    
            Covered by fast/images/webp-image-decoding.html in debug.
    
            * platform/image-decoders/webp/WEBPImageDecoder.cpp:
            (WebCore::WEBPImageDecoder::decode):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70392 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index d7c033b..f872036 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2010-10-23  Adam Barth  <abarth at webkit.org>
+
+        Reviewed by Andreas Kling.
+
+        WebP decoding hits ASSERT
+        https://bugs.webkit.org/show_bug.cgi?id=48168
+
+        Calling reserveCapacity only allocates the memory.  It doesn't actually
+        set the length.  When you try to access the zeroth element, you hit an
+        ASSERT.
+
+        Covered by fast/images/webp-image-decoding.html in debug.
+
+        * platform/image-decoders/webp/WEBPImageDecoder.cpp:
+        (WebCore::WEBPImageDecoder::decode):
+
 2010-10-23  Martin Robinson  <mrobinson at igalia.com>
 
         Reviewed by Xan Lopez.
diff --git a/WebCore/platform/image-decoders/webp/WEBPImageDecoder.cpp b/WebCore/platform/image-decoders/webp/WEBPImageDecoder.cpp
index 5794fd6..979b193 100644
--- a/WebCore/platform/image-decoders/webp/WEBPImageDecoder.cpp
+++ b/WebCore/platform/image-decoders/webp/WEBPImageDecoder.cpp
@@ -103,8 +103,8 @@ bool WEBPImageDecoder::decode(bool onlySize)
     }
     const int stride = width * bytesPerPixel;
     Vector<uint8_t> rgb;
-    rgb.reserveCapacity(height * stride);
-    if (!WebPDecodeBGRInto(dataBytes, dataSize, &rgb[0], height * stride, stride))
+    rgb.resize(height * stride);
+    if (!WebPDecodeBGRInto(dataBytes, dataSize, rgb.data(), rgb.size(), stride))
         return setFailed();
     // FIXME: remove this data copy.
     for (int y = 0; y < height; ++y) {

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list