[asterisk-bugs] [JIRA] (ASTERISK-28975) res_http_websocket: Text payload data doesn't necessary include trailing zero
Asterisk Team (JIRA)
noreply at issues.asterisk.org
Wed Sep 9 11:04:45 CDT 2020
[ https://issues.asterisk.org/jira/browse/ASTERISK-28975?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Asterisk Team updated ASTERISK-28975:
-------------------------------------
Target Release Version/s: 18.0.0
> res_http_websocket: Text payload data doesn't necessary include trailing zero
> -----------------------------------------------------------------------------
>
> Key: ASTERISK-28975
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-28975
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: Resources/res_http_websocket
> Affects Versions: 13.34.0, 16.11.1, 17.5.1
> Reporter: Nickolay V. Shmyrev
> Assignee: Nickolay V. Shmyrev
> Target Release: 13.36.0, 16.13.0, 17.7.0, 18.0.0
>
>
> According to websocket spec https://tools.ietf.org/html/rfc6455#section-5.7 and practice there is no trailing zero for text messages, however, the code of ast_websocket_read_string expects them in this part:
> {code}
> if (!(*buf = ast_malloc(payload_len + 1))) {
> return -1;
> }
> ast_copy_string(*buf, payload, payload_len + 1);
> return payload_len + 1;
> {code}
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list