aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_macro.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/app_macro.c')
-rwxr-xr-xapps/app_macro.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/app_macro.c b/apps/app_macro.c
index dd53946bd..ea6775c90 100755
--- a/apps/app_macro.c
+++ b/apps/app_macro.c
@@ -122,8 +122,9 @@ static int macro_exec(struct ast_channel *chan, void *data)
pbx_builtin_setvar_helper(chan, "MACRO_OFFSET", NULL);
/* Setup environment for new run */
- strcpy(chan->exten, "s");
- strncpy(chan->context, fullmacro, sizeof(chan->context));
+ chan->exten[0] = 's';
+ chan->exten[1] = '\0';
+ strncpy(chan->context, fullmacro, sizeof(chan->context) - 1);
chan->priority = 1;
while((cur = strsep(&rest, "|")) && (argc < MAX_ARGS)) {
@@ -193,8 +194,8 @@ out:
pbx_builtin_setvar_helper(chan, "MACRO_PRIORITY", save_macro_priority);
if (save_macro_priority) free(save_macro_priority);
if (setmacrocontext) {
- strcpy(chan->macrocontext, "");
- strcpy(chan->macroexten, "");
+ chan->macrocontext[0] = '\0';
+ chan->macroexten[0] = '\0';
chan->macropriority = 0;
}