aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_macro.c
diff options
context:
space:
mode:
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 bbef7683a..313c930f2 100644
--- a/apps/app_macro.c
+++ b/apps/app_macro.c
@@ -201,12 +201,12 @@ static int _macro_exec(struct ast_channel *chan, void *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 */
@@ -214,7 +214,7 @@ static int _macro_exec(struct ast_channel *chan, void *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);
@@ -467,7 +467,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;
}