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

paroga at webkit.org paroga at webkit.org
Wed Dec 22 13:59:16 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 5833c41b6c093a771cbf966acc80e8596152e775
Author: paroga at webkit.org <paroga at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Sep 30 22:19:05 2010 +0000

    2010-09-30  Patrick Gansterer  <paroga at webkit.org>
    
            Reviewed by Adam Roben.
    
            [WINCE] Fix InternetGetCookie in CookieJarWin.cpp
            https://bugs.webkit.org/show_bug.cgi?id=46929
    
            If the InternetGetCookie fails the output size won't be set.
            Set the default size to 0, so we always get the correct size
            and check the return value of InternetGetCookie.
    
            * platform/network/win/CookieJarWin.cpp:
            (WebCore::cookies):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68841 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 81e417a..ec2b180 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -2,6 +2,20 @@
 
         Reviewed by Adam Roben.
 
+        [WINCE] Fix InternetGetCookie in CookieJarWin.cpp
+        https://bugs.webkit.org/show_bug.cgi?id=46929
+
+        If the InternetGetCookie fails the output size won't be set.
+        Set the default size to 0, so we always get the correct size
+        and check the return value of InternetGetCookie.
+
+        * platform/network/win/CookieJarWin.cpp:
+        (WebCore::cookies):
+
+2010-09-30  Patrick Gansterer  <paroga at webkit.org>
+
+        Reviewed by Adam Roben.
+
         [WINCE] Use OwnPtr for HBRUSH and HPEN in GraphicsContext
         https://bugs.webkit.org/show_bug.cgi?id=46881
 
diff --git a/WebCore/platform/network/win/CookieJarWin.cpp b/WebCore/platform/network/win/CookieJarWin.cpp
index 2bdd6b3..a2afbc6 100644
--- a/WebCore/platform/network/win/CookieJarWin.cpp
+++ b/WebCore/platform/network/win/CookieJarWin.cpp
@@ -48,13 +48,17 @@ String cookies(const Document* /*document*/, const KURL& url)
 {
     String str = url.string();
 
-    DWORD count = str.length() + 1;
-    InternetGetCookie(str.charactersWithNullTermination(), 0, 0, &count);
+    DWORD count = 0;
+    if (!InternetGetCookie(str.charactersWithNullTermination(), 0, 0, &count))
+        return String();
+
     if (count <= 1) // Null terminator counts as 1.
         return String();
 
     Vector<UChar> buffer(count);
-    InternetGetCookie(str.charactersWithNullTermination(), 0, buffer.data(), &count);
+    if (!InternetGetCookie(str.charactersWithNullTermination(), 0, buffer.data(), &count))
+        return String();
+
     buffer.shrink(count - 1); // Ignore the null terminator.
     return String::adopt(buffer);
 }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list