diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-12-27 22:30:28 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-12-27 22:30:28 +0000 |
commit | 65d15d6d6237d022dc6951185051aca8fbfbaa3b (patch) | |
tree | d684263bb650b4ee9eb5cd2a6b6a8481f1a8edd0 /main/ast_expr2f.c | |
parent | 87686ce87549113edc29ea5f32d96b7a90be509d (diff) |
Merged revisions 49009 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r49009 | file | 2006-12-27 17:28:46 -0500 (Wed, 27 Dec 2006) | 2 lines
ast_copy_string is not available when LOW_MEMORY is used and things are being built in the utils directory, so we need to resort to the old method of strncpy. (issue #8579 reported by mottano)
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@49010 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/ast_expr2f.c')
-rw-r--r-- | main/ast_expr2f.c | 6 |
1 files changed, 3 insertions, 3 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); } |