mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 11:25:35 +00:00
res_ari: Fix audiosocket segfault
Add check that data parameter specified when audiosocket used for externalMedia. ASTERISK-29514 #close Change-Id: Ie562f03c5d6c3835a3631f376b3d43e75b8f9617
This commit is contained in:
committed by
Igor Goncharovsky
parent
0ac9c83561
commit
99d44f0c5a
@@ -2134,6 +2134,11 @@ static void external_media_audiosocket_tcp(struct ast_ari_channels_external_medi
|
||||
struct ast_channel *chan;
|
||||
struct varshead *vars;
|
||||
|
||||
if (ast_strlen_zero(args->data)) {
|
||||
ast_ari_response_error(response, 400, "Bad Request", "data can not be empty");
|
||||
return;
|
||||
}
|
||||
|
||||
endpoint_len = strlen("AudioSocket/") + strlen(args->external_host) + 1 + strlen(args->data) + 1;
|
||||
endpoint = ast_alloca(endpoint_len);
|
||||
/* The UUID is stored in the arbitrary data field */
|
||||
|
Reference in New Issue
Block a user