mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-18 18:58:22 +00:00
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: https://origsvn.digium.com/svn/asterisk/trunk@253579 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user