Commit backport by Michael Gilbert <michael.s.gilbert@gmail.com>
authorHuzaifa Sidhpurwala <huzaifas@redhat.com>
Tue, 8 Feb 2011 08:57:47 +0000 (14:27 +0530)
committerHuzaifa Sidhpurwala <huzaifas@redhat.com>
Tue, 8 Feb 2011 08:57:47 +0000 (14:27 +0530)
commita2106249738891e68a577a5710bd43c3ba64070e
treeac5997ca77ca07dcc06546dae36c391b95b762a5
parent24710a663ea000a071208c3bc0dd7d7fd9a0e088
Commit backport by Michael Gilbert <michael.s.gilbert@gmail.com>
Add test case

    2010-08-11  Fumitoshi Ukai  <ukai@chromium.org>

            Reviewed by Alexey Proskuryakov.

            Fix length calculation to be more robust.
            https://bugs.webkit.org/show_bug.cgi?id=43777

            * websocket/tests/frame-length-overflow-expected.txt: Added.
            * websocket/tests/frame-length-overflow.html: Added.
            * websocket/tests/frame-length-overflow_wsh.py: Added.
    2010-08-11  Fumitoshi Ukai  <ukai@chromium.org>

            Reviewed by Alexey Proskuryakov.

            Fix length calculation to be more robust.
            https://bugs.webkit.org/show_bug.cgi?id=43777

            Test: websocket/tests/frame-length-overflow.html

            * websockets/WebSocketChannel.cpp:
            (WebCore::WebSocketChannel::appendToBuffer): len is size_t.
             - add sanity check for integer wraps.
            (WebCore::WebSocketChannel::skipBuffer): len is size_t.
            (WebCore::WebSocketChannel::processBuffer): length is size_t.
             - add sanity check for integer wraps.
            * websockets/WebSocketChannel.h: change m_bufferSize and len to size_t.

    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65135 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/websocket/tests/frame-length-overflow-expected.txt [new file with mode: 0644]
LayoutTests/websocket/tests/frame-length-overflow.html [new file with mode: 0644]
LayoutTests/websocket/tests/frame-length-overflow_wsh.py [new file with mode: 0644]
WebCore/websockets/WebSocketChannel.cpp
WebCore/websockets/WebSocketChannel.h