]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[Core] Fix dereference of null pointer in switch_ivr_wait_for_answer()
authorAndrey Volk <andywolk@gmail.com>
Thu, 1 Apr 2021 20:53:57 +0000 (23:53 +0300)
committerAndrey Volk <andywolk@gmail.com>
Tue, 19 Oct 2021 17:35:10 +0000 (20:35 +0300)
src/switch_ivr_originate.c

index 9785d0b7aa0c8e5a31d6577c7f9f5e7ca607b556..31ce629d40f19b87869b8664a02f690821141bfa 100644 (file)
@@ -1145,6 +1145,11 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_wait_for_answer(switch_core_session_t
 
                if (read_frame && !pass) {
 
+                       if (!write_frame.codec) {
+                               status = SWITCH_STATUS_FALSE;
+                               break;
+                       }
+
                        if (ringback.fh) {
                                switch_size_t mlen, olen;
                                unsigned int pos = 0;