diff options
author | Jonathan Rose <jrose@digium.com> | 2012-07-20 19:36:05 +0000 |
---|---|---|
committer | Jonathan Rose <jrose@digium.com> | 2012-07-20 19:36:05 +0000 |
commit | a5e10001b29207598a203beb475edbc89a02cc4d (patch) | |
tree | 96e362edf84c36d77678dd7da8cf66b1bf918d60 /channels/chan_iax2.c | |
parent | fbf4040a36992856397ebba90bffa54d276f0d86 (diff) |
chan_iax2: Fix a segfault introduced by call ID logging
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
Diffstat (limited to 'channels/chan_iax2.c')
-rw-r--r-- | channels/chan_iax2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index 8efad88c8..70318a14c 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -10170,7 +10170,7 @@ static int socket_process_helper(struct iax2_thread *thread) 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); |