From: Mike Bradeen Date: Fri, 8 Sep 2023 19:04:10 +0000 (-0600) Subject: res_speech_aeap: check for null format on response X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3759d034ccd69508cd311881a0b9b77cee7d2f3d;p=thirdparty%2Fasterisk.git 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. --- diff --git a/res/res_speech_aeap.c b/res/res_speech_aeap.c index 1aa8041d53..9da68bce39 100644 --- a/res/res_speech_aeap.c +++ b/res/res_speech_aeap.c @@ -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;