]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Need to take into account the \0 terminator of the old string to determine the amount...
authorDoug Bailey <dbailey@digium.com>
Wed, 18 Feb 2009 15:59:22 +0000 (15:59 +0000)
committerDoug Bailey <dbailey@digium.com>
Wed, 18 Feb 2009 15:59:22 +0000 (15:59 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@176945 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/utils.c

index 3d3da881ca9e8a3c9fe4c2cd9cb5f8f6314850a7..d117174f64b566d9d8fc3f334b90a82e6e24d13b 100644 (file)
@@ -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;