[asterisk-commits] jpeeler: branch 1.6.2 r212509 - in /branches/1.6.2: ./ channels/misdn_config.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Aug 17 11:52:47 CDT 2009


Author: jpeeler
Date: Mon Aug 17 11:52:43 2009
New Revision: 212509

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=212509
Log:
Merged revisions 212506 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
  r212506 | jpeeler | 2009-08-17 11:50:45 -0500 (Mon, 17 Aug 2009) | 19 lines
  
  Merged revisions 212498 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r212498 | jpeeler | 2009-08-17 11:34:56 -0500 (Mon, 17 Aug 2009) | 12 lines
    
    Fix segfault when reloading chan_misdn.
    
    If more ports were specified than configured in misdn.conf a reload would crash
    asterisk. The problem was the unconfigured port was using data from the
    previously configured port. When the data for an unconfigured port was freed a
    crash would result from the double free.
    
    (closes issue #12113)
    Reported by: agupta
    Patches:
          bug12113.patch uploaded by jpeeler (license 325)
  ........
................

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

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

Modified: branches/1.6.2/channels/misdn_config.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.6.2/channels/misdn_config.c?view=diff&rev=212509&r1=212508&r2=212509
==============================================================================
--- branches/1.6.2/channels/misdn_config.c (original)
+++ branches/1.6.2/channels/misdn_config.c Mon Aug 17 11:52:43 2009
@@ -1002,6 +1002,11 @@
 	}
 
 	for (i = 0; i < (max_ports + 1); ++i) {
+		if (i > 0 && cfg_for_ports[0]) {
+			/* default category, will populate the port_cfg with additional port
+			categories in subsequent calls to this function */
+			memset(cfg_tmp, 0, sizeof(cfg_tmp));
+		}
 		if (cfg_for_ports[i]) {
 			memcpy(port_cfg[i], cfg_tmp, sizeof(cfg_tmp));
 		}




More information about the asterisk-commits mailing list