Преглед на файлове

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.
Max Bruckner преди 8 години
родител
ревизия
f09bdef15e
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      test.c

+ 1 - 1
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)
     {