]> 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)
committerBenjamin Keith Ford <bford@digium.com>
Wed, 21 Feb 2018 16:32:18 +0000 (10:32 -0600)
commitf1a4691741705e5426de38580b8c3d985d4e78af
treefd2d8ce2d67ee8c1beb7df0d79ad4d05a93bfe48
parent6285575eac5ecd89ed1290e8124593a7e6a7a23e
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