res_speech_aeap: check for null format on response

* Fixed issue in res_speech_aeap when unable to provide an
  input format to check against.

(cherry picked from commit b53e946b59)
This commit is contained in:
Mike Bradeen 2023-09-08 13:04:10 -06:00 committed by Asterisk Development Team
parent 9ee35c259a
commit b68370ba9c
1 changed files with 5 additions and 0 deletions

View File

@ -279,6 +279,11 @@ static int handle_response_setup(struct ast_aeap *aeap, struct ast_aeap_message
struct ast_json *json = ast_aeap_message_data(message);
const char *codec_name;
if (!format) {
log_error(aeap, "no 'format' set");
return -1;
}
if (!json) {
log_error(aeap, "no 'setup' object returned");
return -1;