diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-03-20 16:50:38 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-03-20 16:50:38 +0000 |
commit | 86d8630481441988067b2d82f5d3cca6e2741754 (patch) | |
tree | b527f70e86d6751bc3a64013932efe922b8fcbcd /funcs | |
parent | 4349aaed675b95a4bcc6a4ab91728a8bc3469698 (diff) |
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
Diffstat (limited to 'funcs')
-rw-r--r-- | funcs/func_strings.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/funcs/func_strings.c b/funcs/func_strings.c index fa0174c60..184300d25 100644 --- a/funcs/func_strings.c +++ b/funcs/func_strings.c @@ -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); |