[asterisk-commits] russell: trunk r85557 - in /trunk: ./ pbx/pbx_dundi.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Oct 15 10:47:47 CDT 2007


Author: russell
Date: Mon Oct 15 10:47:46 2007
New Revision: 85557

URL: http://svn.digium.com/view/asterisk?view=rev&rev=85557
Log:
Merged revisions 85556 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r85556 | russell | 2007-10-15 10:40:45 -0500 (Mon, 15 Oct 2007) | 9 lines

Ensure the buffer passed to ast_canmatch_extension() is properly initialized so
that it is null terminated.

(issue #10977)
Reported by: dimas
Patches: 
      pbxdundi.patch uploaded by dimas (license 88)
	    - small mods by me

........

Modified:
    trunk/   (props changed)
    trunk/pbx/pbx_dundi.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/pbx/pbx_dundi.c
URL: http://svn.digium.com/view/asterisk/trunk/pbx/pbx_dundi.c?view=diff&rev=85557&r1=85556&r2=85557
==============================================================================
--- trunk/pbx/pbx_dundi.c (original)
+++ trunk/pbx/pbx_dundi.c Mon Oct 15 10:47:46 2007
@@ -596,8 +596,8 @@
 		} else {
 			/* No answers...  Find the fewest number of digits from the
 			   number for which we have no answer. */
-			char tmp[AST_MAX_EXTENSION];
-			for (x=0;x<AST_MAX_EXTENSION;x++) {
+			char tmp[AST_MAX_EXTENSION + 1] = "";
+			for (x = 0; x < (sizeof(tmp) - 1); x++) {
 				tmp[x] = called_number[x];
 				if (!tmp[x])
 					break;




More information about the asterisk-commits mailing list