[Core] Fix dereference of null pointer in switch_ivr_wait_for_answer()

This commit is contained in:
Andrey Volk 2021-04-01 23:53:57 +03:00
parent af095ebb68
commit 4b03a47a7f

View 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;