[asterisk-commits] russell: trunk r253579 - /trunk/funcs/func_strings.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sat Mar 20 11:50:43 CDT 2010
Author: russell
Date: Sat Mar 20 11:50:38 2010
New Revision: 253579
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=253579
Log:
Fix memory corruption found by unit tests.
ast_str_reset() was being called on a potentially uninitialized pointer.
Valgrind is my hero, once again.
Modified:
trunk/funcs/func_strings.c
Modified: trunk/funcs/func_strings.c
URL: http://svnview.digium.com/svn/asterisk/trunk/funcs/func_strings.c?view=diff&rev=253579&r1=253578&r2=253579
==============================================================================
--- trunk/funcs/func_strings.c (original)
+++ trunk/funcs/func_strings.c Sat Mar 20 11:50:38 2010
@@ -525,7 +525,7 @@
flen = strlen(args.fieldvalue);
- ast_str_reset(result);
+ ast_str_reset(*result_ptr);
/* Enough space for any result */
if (len > -1) {
ast_str_make_space(result_ptr, len ? len : ast_str_strlen(orig_list) + 1);
More information about the asterisk-commits
mailing list