diff --git a/test.c b/test.c index 86fe448..9277497 100644 --- a/test.c +++ b/test.c @@ -114,7 +114,7 @@ static int print_preallocated(cJSON *root) } /* create buffer to fail */ - len_fail = strlen(out) + sizeof('\0'); + len_fail = strlen(out); buf_fail = (char*)malloc(len_fail); if (buf_fail == NULL) {