]> git.ipfire.org Git - thirdparty/asterisk.git/commit
AST-2018-006: Properly handle WebSocket frames with 0 length payload.
authorSean Bright <sean.bright@gmail.com>
Mon, 5 Feb 2018 22:46:26 +0000 (17:46 -0500)
committerBen Ford <bford@digium.com>
Wed, 21 Feb 2018 16:31:52 +0000 (10:31 -0600)
commit64361379592bf80d000f3a5802dc6d3a1e9bb8d2
tree3ebe5715a8a2effa9abf9f4c3fa4169c81cf0d4e
parentf063ea650ede1b6c6f95298619ca7940c23e9d72
AST-2018-006: Properly handle WebSocket frames with 0 length payload.

In ast_websocket_read() we were not adequately checking that the
payload_len was non-zero before passing it to ws_safe_read(). Calling
ws_safe_read with a len argument of 0 will result in a busy loop until
the underlying socket is closed.

ASTERISK-27658 #close

Change-Id: I9d59f83bc563f711df1a6197c57de473f6b0663a
res/res_http_websocket.c