mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-19 19:52:48 +00:00
Don't set a new value for the END_ variable on the channel before using the
old value. If you do, it will lead to accessing a memory address that has been free()'d. (issue #8895, arkadia) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@51828 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -275,8 +275,8 @@ static int _while_exec(struct ast_channel *chan, void *data, int end)
|
|||||||
pbx_builtin_setvar_helper(chan, my_name, NULL);
|
pbx_builtin_setvar_helper(chan, my_name, NULL);
|
||||||
snprintf(end_varname,VAR_SIZE,"END_%s",varname);
|
snprintf(end_varname,VAR_SIZE,"END_%s",varname);
|
||||||
if ((goto_str=pbx_builtin_getvar_helper(chan, end_varname))) {
|
if ((goto_str=pbx_builtin_getvar_helper(chan, end_varname))) {
|
||||||
pbx_builtin_setvar_helper(chan, end_varname, NULL);
|
|
||||||
ast_parseable_goto(chan, goto_str);
|
ast_parseable_goto(chan, goto_str);
|
||||||
|
pbx_builtin_setvar_helper(chan, end_varname, NULL);
|
||||||
} else {
|
} else {
|
||||||
int pri = find_matching_endwhile(chan);
|
int pri = find_matching_endwhile(chan);
|
||||||
if (pri > 0) {
|
if (pri > 0) {
|
||||||
|
Reference in New Issue
Block a user