diff options
author | Tilghman Lesher <tilghman@meg.abyt.es> | 2009-08-10 19:20:57 +0000 |
---|---|---|
committer | Tilghman Lesher <tilghman@meg.abyt.es> | 2009-08-10 19:20:57 +0000 |
commit | 642bec4d6fea7afad99b6a4853418081137a48ba (patch) | |
tree | 2596a6cb913ad8bd78e4670d298dc1d4682b2d23 /apps/app_macro.c | |
parent | 41894bea92b7d2079fd666a3186b84ff92a5e0e5 (diff) |
AST-2009-005
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@211539 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_macro.c')
-rw-r--r-- | apps/app_macro.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/app_macro.c b/apps/app_macro.c index e48d3c361..f3ff81db5 100644 --- a/apps/app_macro.c +++ b/apps/app_macro.c @@ -266,12 +266,12 @@ static int _macro_exec(struct ast_channel *chan, const char *data, int exclusive /* does the user want a deeper rabbit hole? */ ast_channel_lock(chan); if ((s = pbx_builtin_getvar_helper(chan, "MACRO_RECURSION"))) { - sscanf(s, "%d", &maxdepth); + sscanf(s, "%30d", &maxdepth); } /* Count how many levels deep the rabbit hole goes */ if ((s = pbx_builtin_getvar_helper(chan, "MACRO_DEPTH"))) { - sscanf(s, "%d", &depth); + sscanf(s, "%30d", &depth); } /* Used for detecting whether to return when a Macro is called from another Macro after hangup */ @@ -279,7 +279,7 @@ static int _macro_exec(struct ast_channel *chan, const char *data, int exclusive pbx_builtin_setvar_helper(chan, "MACRO_IN_HANGUP", "1"); if ((inhangupc = pbx_builtin_getvar_helper(chan, "MACRO_IN_HANGUP"))) { - sscanf(inhangupc, "%d", &inhangup); + sscanf(inhangupc, "%30d", &inhangup); } ast_channel_unlock(chan); @@ -543,7 +543,7 @@ static int _macro_exec(struct ast_channel *chan, const char *data, int exclusive if ((offsets = pbx_builtin_getvar_helper(chan, "MACRO_OFFSET"))) { /* Handle macro offset if it's set by checking the availability of step n + offset + 1, otherwise continue normally if there is any problem */ - if (sscanf(offsets, "%d", &offset) == 1) { + if (sscanf(offsets, "%30d", &offset) == 1) { if (ast_exists_extension(chan, chan->context, chan->exten, chan->priority + offset + 1, chan->cid.cid_num)) { chan->priority += offset; } |