From bf0b8526b115e76bbda83c8afffb03525eb7883b Mon Sep 17 00:00:00 2001 From: Doug Bailey Date: Wed, 18 Feb 2009 15:59:22 +0000 Subject: [PATCH] Need to take into account the \0 terminator of the old string to determine the amount available. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@176945 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- main/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/utils.c b/main/utils.c index 3d3da881ca..d117174f64 100644 --- a/main/utils.c +++ b/main/utils.c @@ -1265,7 +1265,7 @@ void __ast_string_field_index_build_va(struct ast_string_field_mgr *mgr, */ if (fields[index][0] != '0') { target = (char *) fields[index]; - available = strlen(fields[index]); + available = strlen(fields[index]) + 1; } else { target = mgr->pool->base + mgr->used; available = mgr->space; -- 2.47.2