2009-10-22 Fumitoshi Ukai <ukai@chromium.org>
authoreric@webkit.org <eric@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Oct 2009 07:11:24 +0000 (07:11 +0000)
committereric@webkit.org <eric@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Oct 2009 07:11:24 +0000 (07:11 +0000)
        Reviewed by Alexey Proskuryakov.

        Fix calculation of length in WebSocketChannel.cpp
        https://bugs.webkit.org/show_bug.cgi?id=30656

        * websockets/WebSocketChannel.cpp:
        (WebCore::WebSocketChannel::didReceiveData):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@49932 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/websockets/WebSocketChannel.cpp

index df63cf5..1a886a2 100644 (file)
@@ -1,3 +1,13 @@
+2009-10-22  Fumitoshi Ukai  <ukai@chromium.org>
+
+        Reviewed by Alexey Proskuryakov.
+
+        Fix calculation of length in WebSocketChannel.cpp
+        https://bugs.webkit.org/show_bug.cgi?id=30656
+
+        * websockets/WebSocketChannel.cpp:
+        (WebCore::WebSocketChannel::didReceiveData):
+
 2009-10-21  Dumitru Daniliuc  <dumi@chromium.org>
 
         Reviewed by Dimitri Glazkov.
index 145cd34..5cbbd24 100644 (file)
@@ -184,7 +184,7 @@ void WebSocketChannel::didReceiveData(SocketStreamHandle* handle, const char* da
                     handle->close();
                     return;
                 }
-                length = length * 128 + *p & 0x7f;
+                length = length * 128 + (*p & 0x7f);
                 ++p;
             }
             if (p + length < end) {