aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/ast_expr2f.c6
-rw-r--r--pbx/ael/ael_lex.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/main/ast_expr2f.c b/main/ast_expr2f.c
index 3693e4842..eb4691dc4 100644
--- a/main/ast_expr2f.c
+++ b/main/ast_expr2f.c
@@ -3134,11 +3134,11 @@ int ast_expr(char *expr, char *buf, int length)
res_length = snprintf(buf, length, "%ld", (long int) io.val->u.i);
return_value = (res_length <= length) ? res_length : length;
} else {
-#ifdef STANDALONE
+#if defined(STANDALONE) || defined(LOW_MEMORY)
strncpy(buf, io.val->u.s, length - 1);
-#else /* !STANDALONE */
+#else /* !STANDALONE && !LOW_MEMORY */
ast_copy_string(buf, io.val->u.s, length);
-#endif /* STANDALONE */
+#endif /* STANDALONE || LOW_MEMORY */
return_value = strlen(buf);
free(io.val->u.s);
}
diff --git a/pbx/ael/ael_lex.c b/pbx/ael/ael_lex.c
index e416f6afb..7468a46bb 100644
--- a/pbx/ael/ael_lex.c
+++ b/pbx/ael/ael_lex.c
@@ -1689,7 +1689,7 @@ YY_RULE_SETUP
if (*(p1+1) != '/')
snprintf(fnamebuf, sizeof(fnamebuf), "%s/%s", ast_config_AST_CONFIG_DIR, p1 + 1);
else
-#ifdef STANDALONE
+#if defined(STANDALONE) || defined(LOW_MEMORY)
strncpy(fnamebuf, p1 + 1, sizeof(fnamebuf) - 1);
#else
ast_copy_string(fnamebuf, p1 + 1, sizeof(fnamebuf));