[asterisk-commits] dvossel: branch 1.6.2 r245794 - in /branches/1.6.2: ./ channels/chan_iax2.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Feb 9 17:12:05 CST 2010


Author: dvossel
Date: Tue Feb  9 17:11:59 2010
New Revision: 245794

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=245794
Log:
Merged revisions 245793 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
  r245793 | dvossel | 2010-02-09 17:07:17 -0600 (Tue, 09 Feb 2010) | 18 lines
  
  Merged revisions 245792 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r245792 | dvossel | 2010-02-09 16:55:38 -0600 (Tue, 09 Feb 2010) | 12 lines
    
    Fixes iaxs and iaxsl size off by one issue.
    
    2^15 = 32768 which is the maximum allowed iax2 callnumber.
    Creating the iaxs and iaxsl array of size 32768 means the maximum
    callnumber is actually out of bounds.  This causes a nasty crash.
    
    (closes issue #15997)
    Reported by: exarv
    Patches:
          iax_fix.diff uploaded by dvossel (license 671)
  ........
................

Modified:
    branches/1.6.2/   (props changed)
    branches/1.6.2/channels/chan_iax2.c

Propchange: branches/1.6.2/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.2/channels/chan_iax2.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.2/channels/chan_iax2.c?view=diff&rev=245794&r1=245793&r2=245794
==============================================================================
--- branches/1.6.2/channels/chan_iax2.c (original)
+++ branches/1.6.2/channels/chan_iax2.c Tue Feb  9 17:11:59 2010
@@ -1005,7 +1005,7 @@
  * based on the local call number.  The local call number is used as the
  * index into the array where the associated pvt structure is stored.
  */
-static struct chan_iax2_pvt *iaxs[IAX_MAX_CALLS];
+static struct chan_iax2_pvt *iaxs[IAX_MAX_CALLS + 1];
 
 /*!
  * \brief Another container of iax2_pvt structures
@@ -1036,7 +1036,7 @@
 
 /* Flag to use with trunk calls, keeping these calls high up.  It halves our effective use
    but keeps the division between trunked and non-trunked better. */
-#define TRUNK_CALL_START	ARRAY_LEN(iaxs) / 2
+#define TRUNK_CALL_START	IAX_MAX_CALLS / 2
 
 /* Debug routines... */
 static struct sockaddr_in debugaddr;




More information about the asterisk-commits mailing list