[asterisk-commits] tilghman: branch 1.4 r117809 - /branches/1.4/funcs/func_realtime.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu May 22 11:47:09 CDT 2008


Author: tilghman
Date: Thu May 22 11:47:03 2008
New Revision: 117809

URL: http://svn.digium.com/view/asterisk?view=rev&rev=117809
Log:
Take into account the length of delimiters when calculating result string length.
(closes issue #12696)
 Reported by: adomjan
 Patches: 
       func_realtime.c-longdelimiter.patch uploaded by adomjan (license 487)

Modified:
    branches/1.4/funcs/func_realtime.c

Modified: branches/1.4/funcs/func_realtime.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/funcs/func_realtime.c?view=diff&rev=117809&r1=117808&r2=117809
==============================================================================
--- branches/1.4/funcs/func_realtime.c (original)
+++ branches/1.4/funcs/func_realtime.c Thu May 22 11:47:03 2008
@@ -86,7 +86,7 @@
 		return -1;
 	}
 	for (var = head; var; var = var->next)
-		resultslen += strlen(var->name) + strlen(var->value) + 2;
+		resultslen += strlen(var->name) + strlen(var->value) + strlen(args.delim1) + strlen(args.delim2);
 
 	result_begin = results = alloca(resultslen);
 	for (var = head; var; var = var->next)




More information about the asterisk-commits mailing list