[Core] Fix possible dereference of null pointer in switch_ivr_originate() and switch_ivr_enterprise_originate()
This commit is contained in:
parent
4b03a47a7f
commit
67048377c4
|
@ -1673,7 +1673,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_enterprise_originate(switch_core_sess
|
||||||
getcause = 0;
|
getcause = 0;
|
||||||
switch_goto_status(SWITCH_STATUS_FALSE, end);
|
switch_goto_status(SWITCH_STATUS_FALSE, end);
|
||||||
}
|
}
|
||||||
} else {
|
} else if (hl) {
|
||||||
x_argc = hl->handle_idx;
|
x_argc = hl->handle_idx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3487,7 +3487,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} 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.datalen = (uint32_t)switch_buffer_read(early_state.buffer, write_frame.data,
|
||||||
write_frame.codec->implementation->decoded_bytes_per_packet);
|
write_frame.codec->implementation->decoded_bytes_per_packet);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue