From: Andrey Volk Date: Mon, 19 Apr 2021 18:16:28 +0000 (+0300) Subject: [Core] Fix possible dereference of null pointer in switch_ivr_originate() and switch_... X-Git-Tag: v1.10.7^2~237 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=67048377c423bde62df096611d09b591de4ae3f2;p=thirdparty%2Ffreeswitch.git [Core] Fix possible dereference of null pointer in switch_ivr_originate() and switch_ivr_enterprise_originate() --- diff --git a/src/switch_ivr_originate.c b/src/switch_ivr_originate.c index 31ce629d40..698b7425ea 100644 --- a/src/switch_ivr_originate.c +++ b/src/switch_ivr_originate.c @@ -1673,7 +1673,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_enterprise_originate(switch_core_sess getcause = 0; switch_goto_status(SWITCH_STATUS_FALSE, end); } - } else { + } else if (hl) { x_argc = hl->handle_idx; } @@ -3487,7 +3487,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess } } } else { - if (switch_buffer_inuse(early_state.buffer) >= write_frame.codec->implementation->decoded_bytes_per_packet) { + if (write_frame.codec && switch_buffer_inuse(early_state.buffer) >= write_frame.codec->implementation->decoded_bytes_per_packet) { write_frame.datalen = (uint32_t)switch_buffer_read(early_state.buffer, write_frame.data, write_frame.codec->implementation->decoded_bytes_per_packet); }