[asterisk-bugs] [JIRA] (ASTERISK-28975) Websocket text payload data doesn't necessary include trailing zero

Nickolay V. Shmyrev (JIRA) noreply at issues.asterisk.org
Thu Jul 2 17:14:25 CDT 2020


Nickolay V. Shmyrev created ASTERISK-28975:
----------------------------------------------

             Summary: 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: 17.5.1, 16.11.1, 13.34.0
            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