projects
/
asterisk/asterisk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3da9f8e
)
Fix memory corruption found by unit tests.
author
Russell Bryant
<russell@russellbryant.com>
Sat, 20 Mar 2010 16:50:38 +0000
(16:50 +0000)
committer
Russell Bryant
<russell@russellbryant.com>
Sat, 20 Mar 2010 16:50:38 +0000
(16:50 +0000)
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
funcs/func_strings.c
patch
|
blob
|
history
diff --git
a/funcs/func_strings.c
b/funcs/func_strings.c
index
fa0174c
..
184300d
100644
(file)
--- 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);