[asterisk-commits] dbailey: trunk r176948 - /trunk/main/utils.c

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


Author: dbailey
Date: Wed Feb 18 10:09:12 2009
New Revision: 176948

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

Modified:
    trunk/main/utils.c

Modified: trunk/main/utils.c
URL: http://svn.digium.com/svn-view/asterisk/trunk/main/utils.c?view=diff&rev=176948&r1=176947&r2=176948
==============================================================================
--- trunk/main/utils.c (original)
+++ trunk/main/utils.c Wed Feb 18 10:09:12 2009
@@ -1600,7 +1600,7 @@
 	*/
 	if ((*ptr)[0] != '0') {
 		target = (char *) *ptr;
-		available = strlen(target);
+		available = strlen(target) + 1;
 	} else {
 		target = (*pool_head)->base + mgr->used;
 		available = space;




More information about the asterisk-commits mailing list