aboutsummaryrefslogtreecommitdiffstats
path: root/main/pbx.c
diff options
context:
space:
mode:
authorjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2010-01-19 22:59:53 +0000
committerjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2010-01-19 22:59:53 +0000
commite1d0d936e63c187c45ec8f2fce702264670d6684 (patch)
tree591a0711d332d15c229e07172063d130cb187a70 /main/pbx.c
parentb17f470e282e1db7efcacfe6cd5a768321e7b96f (diff)
Initialize data on the stack so that Park doesn't interpret random arguments.
passdata was only being set in pbx_substitue_variables when arguments were passed. (closes issue #16406) (closes issue #16586) Reported by: DLNoah Patches: bug16586v2.patch uploaded by jpeeler (license 325) Tested by: DLNoah git-svn-id: http://svn.digium.com/svn/asterisk/trunk@241366 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/pbx.c')
-rw-r--r--main/pbx.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/main/pbx.c b/main/pbx.c
index d0ca80d46..6f67abaea 100644
--- a/main/pbx.c
+++ b/main/pbx.c
@@ -3970,8 +3970,10 @@ static void pbx_substitute_variables(char *passdata, int datalen, struct ast_cha
const char *tmp;
/* Nothing more to do */
- if (!e->data)
+ if (!e->data) {
+ *passdata = '\0';
return;
+ }
/* No variables or expressions in e->data, so why scan it? */
if ((!(tmp = strchr(e->data, '$'))) || (!strstr(tmp, "${") && !strstr(tmp, "$["))) {