[asterisk-commits] dvossel: branch 1.4 r238411 - /branches/1.4/channels/chan_iax2.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jan 7 14:14:29 CST 2010


Author: dvossel
Date: Thu Jan  7 14:14:25 2010
New Revision: 238411

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=238411
Log:
fixes crash in "scheduled_destroy" in chan_iax

A signed short was used to represent a callnumber.  This is makes
it possible to attempt to access the iaxs array with a negative
index.

(closes issue #16565)
Reported by: jensvb


Modified:
    branches/1.4/channels/chan_iax2.c

Modified: branches/1.4/channels/chan_iax2.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.4/channels/chan_iax2.c?view=diff&rev=238411&r1=238410&r2=238411
==============================================================================
--- branches/1.4/channels/chan_iax2.c (original)
+++ branches/1.4/channels/chan_iax2.c Thu Jan  7 14:14:25 2010
@@ -1507,7 +1507,7 @@
 
 static int scheduled_destroy(const void *vid)
 {
-	short callno = PTR_TO_CALLNO(vid);
+	unsigned short callno = PTR_TO_CALLNO(vid);
 	ast_mutex_lock(&iaxsl[callno]);
 	if (iaxs[callno]) {
 		if (option_debug) {




More information about the asterisk-commits mailing list