From fa3dec169b5dd7da5d0a61d49fa296c020137f9d Mon Sep 17 00:00:00 2001 From: Doug Bailey Date: Wed, 18 Feb 2009 16:09:12 +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/trunk@176948 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 3a50289793..a19ed900fd 100644 --- a/main/utils.c +++ b/main/utils.c @@ -1600,7 +1600,7 @@ void __ast_string_field_ptr_build_va(struct ast_string_field_mgr *mgr, */ if ((*ptr)[0] != '0') { target = (char *) *ptr; - available = strlen(target); + available = strlen(target) + 1; } else { target = (*pool_head)->base + mgr->used; available = space;