dect
/
asterisk
Archived
13
0
Fork 0

Fix memory corruption found by unit tests.

ast_str_reset() was being called on a potentially uninitialized pointer.
Valgrind is my hero, once again.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@253579 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
russell 2010-03-20 16:50:38 +00:00
parent 4349aaed67
commit 86d8630481
1 changed files with 1 additions and 1 deletions

View File

@ -525,7 +525,7 @@ static int listfilter(struct ast_channel *chan, const char *cmd, char *parse, ch
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);