]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_http_websocket: read/write string fixup
authorKevin Harwell <kharwell@digium.com>
Mon, 16 Jun 2014 16:22:33 +0000 (16:22 +0000)
committerKevin Harwell <kharwell@digium.com>
Mon, 16 Jun 2014 16:22:33 +0000 (16:22 +0000)
commitbd0aa4fb04afe0d91b5fac2fc697fafd644cc907
tree43dd06d444f6725302ed3333c98a451e9c8e9602
parenta1e0a5e4b07387bcc59afa7c0ab9f960a389ac15
res_http_websocket: read/write string fixup

There was a problem when reading a string from the websocket. It assumed the
received data had a null terminator and tried to write the data to an ast_str.
This of course could/would read past the end of the given buffer while
writing the data to the internal buffer of ast_str. Modified the the code to
correctly place a null terminator on the result string.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@416394 65c4cc65-6c06-0410-ace0-fbb531ad65f3
include/asterisk/http_websocket.h
res/res_http_websocket.c
tests/test_websocket_client.c