[asterisk-bugs] [JIRA] (ASTERISK-28975) res_http_websocket: Text payload data doesn't necessary include trailing zero

Joshua C. Colp (JIRA) noreply at issues.asterisk.org
Mon Jul 6 04:26:25 CDT 2020


     [ https://issues.asterisk.org/jira/browse/ASTERISK-28975?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joshua C. Colp updated ASTERISK-28975:
--------------------------------------

    Status: Open  (was: Triage)

> 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
>
> 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