mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
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/trunk@241366 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -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, "$["))) {
|
||||
|
Reference in New Issue
Block a user