[asterisk-commits] dbailey: branch 1.4 r176945 - /branches/1.4/main/utils.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Feb 18 09:59:22 CST 2009


Author: dbailey
Date: Wed Feb 18 09:59:22 2009
New Revision: 176945

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=176945
Log:
Need to take into account the \0 terminator of the old string to determine the amount available. 

Modified:
    branches/1.4/main/utils.c

Modified: branches/1.4/main/utils.c
URL: http://svn.digium.com/svn-view/asterisk/branches/1.4/main/utils.c?view=diff&rev=176945&r1=176944&r2=176945
==============================================================================
--- branches/1.4/main/utils.c (original)
+++ branches/1.4/main/utils.c Wed Feb 18 09:59:22 2009
@@ -1265,7 +1265,7 @@
 	*/
 	if (fields[index][0] != '0') {
 		target = (char *) fields[index];
-		available = strlen(fields[index]);
+		available = strlen(fields[index]) + 1;
 	} else {
 		target = mgr->pool->base + mgr->used;
 		available = mgr->space;




More information about the asterisk-commits mailing list