Didn't previously check that a non NULL IAX channel was stored in the array
at the requested position before attempting iax_pvt_callid_get
(closes issue ASTERISK-20145)
Reported by: Birger "WIMPy" Harzenetter
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370335
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
if (fr->callno > 0) {
struct ast_callid *mount_callid;
ast_mutex_lock(&iaxsl[fr->callno]);
- if ((mount_callid = iax_pvt_callid_get(fr->callno))) {
+ if (iaxs[fr->callno] && ((mount_callid = iax_pvt_callid_get(fr->callno)))) {
/* Bind to thread */
ast_callid_threadassoc_add(mount_callid);
ast_callid_unref(mount_callid);