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.
This commit is contained in:
Mike Bradeen 2023-09-08 13:04:10 -06:00
parent cff637a24f
commit 3759d034cc
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;