]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 241366 via svnmerge from
authorJeff Peeler <jpeeler@digium.com>
Tue, 19 Jan 2010 23:01:02 +0000 (23:01 +0000)
committerJeff Peeler <jpeeler@digium.com>
Tue, 19 Jan 2010 23:01:02 +0000 (23:01 +0000)
https://origsvn.digium.com/svn/asterisk/trunk

........
  r241366 | jpeeler | 2010-01-19 16:59:53 -0600 (Tue, 19 Jan 2010) | 13 lines

  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: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@241367 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/pbx.c

index 10018a28210bda3a39c5f880c33ca470f3e8f16e..0bcac1a0a8dd0f2fa5894983dfe83e592bad01dd 100644 (file)
@@ -3042,8 +3042,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, "$["))) {