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

sergio at webkit.org sergio at webkit.org
Wed Dec 22 18:45:40 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit b1b44e0f1473f6c5be6755387bcc5d365651cfac
Author: sergio at webkit.org <sergio at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Dec 17 12:46:10 2010 +0000

    2010-12-16  Sergio Villar Senin  <svillar at igalia.com>
    
            Reviewed by Martin Robinson.
    
            Wrong check in ResourceHandleSoup in error cases
            https://bugs.webkit.org/show_bug.cgi?id=51171
    
            Calling didReceiveData with no data causes a crash in debug
            builds. Checking for soupMsg->response_body->data is not correct as libsoup
            always creates a buffer for that. Instead we should check for
            soupMsg->response_body->length
    
            * platform/network/soup/ResourceHandleSoup.cpp:
            (WebCore::sendRequestCallback):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74251 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index f6b3c04..2697977 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2010-12-16  Sergio Villar Senin  <svillar at igalia.com>
+
+        Reviewed by Martin Robinson.
+
+        Wrong check in ResourceHandleSoup in error cases
+        https://bugs.webkit.org/show_bug.cgi?id=51171
+
+        Calling didReceiveData with no data causes a crash in debug
+        builds. Checking for soupMsg->response_body->data is not correct as libsoup
+        always creates a buffer for that. Instead we should check for
+        soupMsg->response_body->length
+
+        * platform/network/soup/ResourceHandleSoup.cpp:
+        (WebCore::sendRequestCallback):
+
 2010-12-17  Andreas Kling  <andreas.kling at nokia.com>
 
         Reviewed by Kenneth Rohde Christiansen.
diff --git a/WebCore/platform/network/soup/ResourceHandleSoup.cpp b/WebCore/platform/network/soup/ResourceHandleSoup.cpp
index 09e1ebe..a2440d3 100644
--- a/WebCore/platform/network/soup/ResourceHandleSoup.cpp
+++ b/WebCore/platform/network/soup/ResourceHandleSoup.cpp
@@ -508,8 +508,11 @@ static void sendRequestCallback(GObject* source, GAsyncResult* res, gpointer use
             fillResponseFromMessage(soupMsg, &d->m_response);
             client->didReceiveResponse(handle.get(), d->m_response);
 
-            // WebCore might have cancelled the job in the while
-            if (!d->m_cancelled && soupMsg->response_body->data)
+            // WebCore might have cancelled the job in the while. We
+            // must check for response_body->length and not
+            // response_body->data as libsoup always creates the
+            // SoupBuffer for the body even if the length is 0
+            if (!d->m_cancelled && soupMsg->response_body->length)
                 client->didReceiveData(handle.get(), soupMsg->response_body->data, soupMsg->response_body->length, true);
         }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list