From f09bdef15ee6f3dc8bcdb3d16eb02b43a9cf813e Mon Sep 17 00:00:00 2001 From: Max Bruckner Date: Tue, 7 Feb 2017 21:22:40 +0100 Subject: [PATCH] Revert "test.c: Fix buffer overrun found by coverity" This reverts commit c866abd84259acacf79524921a0ca6634fd71ddd. The length of this buffer was intentional. This looks like a false positive. --- test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) {