[svn-commits] jrose: trunk r370335 - /trunk/channels/chan_iax2.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Jul 20 14:36:09 CDT 2012


Author: jrose
Date: Fri Jul 20 14:36:05 2012
New Revision: 370335

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=370335
Log:
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

Modified:
    trunk/channels/chan_iax2.c

Modified: trunk/channels/chan_iax2.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_iax2.c?view=diff&rev=370335&r1=370334&r2=370335
==============================================================================
--- trunk/channels/chan_iax2.c (original)
+++ trunk/channels/chan_iax2.c Fri Jul 20 14:36:05 2012
@@ -10170,7 +10170,7 @@
 	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);




More information about the svn-commits mailing list