2009-11-11 Fumitoshi Ukai <ukai@chromium.org>
authorukai@chromium.org <ukai@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Nov 2009 04:17:59 +0000 (04:17 +0000)
committerukai@chromium.org <ukai@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Nov 2009 04:17:59 +0000 (04:17 +0000)
commit78548bfca20b7dbbf9c301e5d2627263a607e5de
tree8a6f89e5c81e9d85c2effc5534a5777b89f841db
parent9107770895435fdb027b687289224a54064e2465
2009-11-11  Fumitoshi Ukai  <ukai@chromium.org>

        Reviewed by Alexey Proskuryakov.

        Fix WebSocket frame parser of frame_type with high-order bit set.
        https://bugs.webkit.org/show_bug.cgi?id=30668

        * websocket/tests/frame-length-longer-than-buffer-expected.txt: Added.
        * websocket/tests/frame-length-longer-than-buffer.html: Added.
        * websocket/tests/frame-length-longer-than-buffer_wsh.py: Added.
        * websocket/tests/frame-length-skip-expected.txt: Added.
        * websocket/tests/frame-length-skip.html: Added.
        * websocket/tests/frame-length-skip_wsh.py: Added.
        * websocket/tests/script-tests/frame-length-longer-than-buffer.js: Added.
        * websocket/tests/script-tests/frame-length-skip.js: Added.
2009-11-11  Fumitoshi Ukai  <ukai@chromium.org>

        Reviewed by Alexey Proskuryakov.

        Fix WebSocket frame parser of frame_type with high-order bit set.
        https://bugs.webkit.org/show_bug.cgi?id=30668

        If buffer is smaller than frame's length, it should break the loop
        instead of reading next byte.

        Tests: websocket/tests/frame-length-longer-than-buffer.html
               websocket/tests/frame-length-skip.html

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

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@50862 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/websocket/tests/frame-length-longer-than-buffer-expected.txt [new file with mode: 0644]
LayoutTests/websocket/tests/frame-length-longer-than-buffer.html [new file with mode: 0644]
LayoutTests/websocket/tests/frame-length-longer-than-buffer_wsh.py [new file with mode: 0644]
LayoutTests/websocket/tests/frame-length-skip-expected.txt [new file with mode: 0644]
LayoutTests/websocket/tests/frame-length-skip.html [new file with mode: 0644]
LayoutTests/websocket/tests/frame-length-skip_wsh.py [new file with mode: 0644]
LayoutTests/websocket/tests/script-tests/frame-length-longer-than-buffer.js [new file with mode: 0644]
LayoutTests/websocket/tests/script-tests/frame-length-skip.js [new file with mode: 0644]
WebCore/ChangeLog
WebCore/websockets/WebSocketChannel.cpp