From: Andrey Volk Date: Thu, 1 Apr 2021 20:53:57 +0000 (+0300) Subject: [Core] Fix dereference of null pointer in switch_ivr_wait_for_answer() X-Git-Tag: v1.10.7^2~238 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4b03a47a7fce86d8bb2bd6235675f0864f7720bf;p=thirdparty%2Ffreeswitch.git [Core] Fix dereference of null pointer in switch_ivr_wait_for_answer() --- diff --git a/src/switch_ivr_originate.c b/src/switch_ivr_originate.c index 9785d0b7aa..31ce629d40 100644 --- a/src/switch_ivr_originate.c +++ b/src/switch_ivr_originate.c @@ -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;