aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_macro.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-08-10 20:14:34 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-08-10 20:14:34 +0000
commitfea057f6474ed94062cf3cbf4ad096bba62d6832 (patch)
treee189c9a20520ae30231ac1c6573db5f3a289b84c /apps/app_macro.c
parent247584d4d4239bc8da24b94e97211296de846046 (diff)
Changes to make 1.4.26 into 1.4.26.1v1.4.26.1
git-svn-id: http://svn.digium.com/svn/asterisk/tags/1.4.26.1@211596 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_macro.c')
-rw-r--r--apps/app_macro.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/app_macro.c b/apps/app_macro.c
index af042913a..5586f24e5 100644
--- a/apps/app_macro.c
+++ b/apps/app_macro.c
@@ -220,18 +220,18 @@ static int _macro_exec(struct ast_channel *chan, void *data, int exclusive)
/* does the user want a deeper rabbit hole? */
s = pbx_builtin_getvar_helper(chan, "MACRO_RECURSION");
if (s)
- sscanf(s, "%d", &maxdepth);
+ sscanf(s, "%30d", &maxdepth);
/* Count how many levels deep the rabbit hole goes */
s = pbx_builtin_getvar_helper(chan, "MACRO_DEPTH");
if (s)
- sscanf(s, "%d", &depth);
+ sscanf(s, "%30d", &depth);
/* Used for detecting whether to return when a Macro is called from another Macro after hangup */
if (strcmp(chan->exten, "h") == 0)
pbx_builtin_setvar_helper(chan, "MACRO_IN_HANGUP", "1");
inhangupc = pbx_builtin_getvar_helper(chan, "MACRO_IN_HANGUP");
if (!ast_strlen_zero(inhangupc))
- sscanf(inhangupc, "%d", &inhangup);
+ sscanf(inhangupc, "%30d", &inhangup);
if (depth >= maxdepth) {
ast_log(LOG_ERROR, "Macro(): possible infinite loop detected. Returning early.\n");
@@ -511,7 +511,7 @@ static int _macro_exec(struct ast_channel *chan, void *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;
}