]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
res_speech_aeap: check for null format on response
authorMike Bradeen <mbradeen@sangoma.com>
Fri, 8 Sep 2023 19:04:10 +0000 (13:04 -0600)
committerMike Bradeen <mbradeen@sangoma.com>
Wed, 13 Sep 2023 17:33:36 +0000 (17:33 +0000)
* Fixed issue in res_speech_aeap when unable to provide an
  input format to check against.

res/res_speech_aeap.c

index 1aa8041d53a189bb28e2c54426f8f14538cfa306..9da68bce39af657bb2f576a96acc6e4f348849b2 100644 (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;