aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-01-24 00:17:50 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-01-24 00:17:50 +0000
commit3fa016ea0d107989814beb996b557c53e6d5772f (patch)
tree71f222d3a2d4c52850d8db3ea585dac83322672c
parentec85d92c783f8e0bd3993f803ecd658bda2baa84 (diff)
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: http://svn.digium.com/svn/asterisk/branches/1.2@51828 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--apps/app_while.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/app_while.c b/apps/app_while.c
index 736038ecd..1cd783469 100644
--- a/apps/app_while.c
+++ b/apps/app_while.c
@@ -275,8 +275,8 @@ static int _while_exec(struct ast_channel *chan, void *data, int end)
pbx_builtin_setvar_helper(chan, my_name, NULL);
snprintf(end_varname,VAR_SIZE,"END_%s",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);
+ pbx_builtin_setvar_helper(chan, end_varname, NULL);
} else {
int pri = find_matching_endwhile(chan);
if (pri > 0) {