cjson-1.7.18-1.fc42

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-126): [#def1]
cjson-1.7.18-build/cJSON-1.7.18/tests/common.h:26: included_from: Included from here.
cjson-1.7.18-build/cJSON-1.7.18/tests/minify_tests.c:29: included_from: Included from here.
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c: scope_hint: In function ‘skip_oneline_comment’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:2816:20: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:2816:20: note: read of 1 byte from after the end of ‘string’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:2816:20: note: valid subscripts for ‘string’ are ‘[0]’ to ‘[6]’
# 2814|       *input += static_strlen("//");
# 2815|   
# 2816|->     for (; (*input)[0] != '\0'; ++(*input))
# 2817|       {
# 2818|           if ((*input)[0] == '\n') {

Error: GCC_ANALYZER_WARNING (CWE-126): [#def2]
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c: scope_hint: In function ‘skip_multiline_comment’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:2829:20: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:2829:20: note: read of 1 byte from after the end of ‘string’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:2829:20: note: valid subscripts for ‘string’ are ‘[0]’ to ‘[6]’
# 2827|       *input += static_strlen("/*");
# 2828|   
# 2829|->     for (; (*input)[0] != '\0'; ++(*input))
# 2830|       {
# 2831|           if (((*input)[0] == '*') && ((*input)[1] == '/'))

Error: GCC_ANALYZER_WARNING (CWE-126): [#def3]
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:2831:46: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:2831:46: note: read of 1 byte from after the end of ‘string’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:2831:46: note: valid subscripts for ‘string’ are ‘[0]’ to ‘[6]’
# 2829|       for (; (*input)[0] != '\0'; ++(*input))
# 2830|       {
# 2831|->         if (((*input)[0] == '*') && ((*input)[1] == '/'))
# 2832|           {
# 2833|               *input += static_strlen("*/");

Error: GCC_ANALYZER_WARNING (CWE-126): [#def4]
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c: scope_hint: In function ‘minify_string’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:2853:54: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:2853:54: note: read of 1 byte from after the end of ‘string’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:2853:54: note: valid subscripts for ‘string’ are ‘[0]’ to ‘[6]’
# 2851|               *output += static_strlen("\"");
# 2852|               return;
# 2853|->         } else if (((*input)[0] == '\\') && ((*input)[1] == '\"')) {
# 2854|               (*output)[1] = (*input)[1];
# 2855|               *input += static_strlen("\"");

Error: GCC_ANALYZER_WARNING (CWE-121): [#def5]
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:2854:26: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:2854:26: note: write of 1 byte to beyond the end of ‘string’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:2854:26: note: valid subscripts for ‘string’ are ‘[0]’ to ‘[6]’
# 2852|               return;
# 2853|           } else if (((*input)[0] == '\\') && ((*input)[1] == '\"')) {
# 2854|->             (*output)[1] = (*input)[1];
# 2855|               *input += static_strlen("\"");
# 2856|               *output += static_strlen("\"");

Error: GCC_ANALYZER_WARNING (CWE-126): [#def6]
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c: scope_hint: In function ‘cJSON_Minify’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:2882:25: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:2882:25: note: read of 1 byte from after the end of ‘pending_escape’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:2882:25: note: valid subscripts for ‘pending_escape’ are ‘[0]’ to ‘[2]’
# 2880|   
# 2881|               case '/':
# 2882|->                 if (json[1] == '/')
# 2883|                   {
# 2884|                       skip_oneline_comment(&json);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def7]
cjson-1.7.18-build/cJSON-1.7.18/fuzzing/fuzz_main.c: scope_hint: In function ‘main’
cjson-1.7.18-build/cJSON-1.7.18/fuzzing/fuzz_main.c:33:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(argv[1], "rb")’
#   31|       rewind(f);
#   32|   
#   33|->     if(siz_buf < 1) goto err;
#   34|   
#   35|       buf = (char*)malloc((size_t)siz_buf);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def8]
cjson-1.7.18-build/cJSON-1.7.18/fuzzing/fuzz_main.c:33:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(argv[1], "rb")’
#   31|       rewind(f);
#   32|   
#   33|->     if(siz_buf < 1) goto err;
#   34|   
#   35|       buf = (char*)malloc((size_t)siz_buf);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def9]
cjson-1.7.18-build/cJSON-1.7.18/fuzzing/fuzz_main.c:35:18: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(argv[1], "rb")’
#   33|       if(siz_buf < 1) goto err;
#   34|   
#   35|->     buf = (char*)malloc((size_t)siz_buf);
#   36|       if(buf == NULL)
#   37|       {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def10]
cjson-1.7.18-build/cJSON-1.7.18/fuzzing/fuzz_main.c:35:18: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(argv[1], "rb")’
#   33|       if(siz_buf < 1) goto err;
#   34|   
#   35|->     buf = (char*)malloc((size_t)siz_buf);
#   36|       if(buf == NULL)
#   37|       {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def11]
cjson-1.7.18-build/cJSON-1.7.18/fuzzing/fuzz_main.c:42:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(argv[1], "rb")’
#   40|       }
#   41|   
#   42|->     if(fread(buf, (size_t)siz_buf, 1, f) != 1)
#   43|       {
#   44|           fprintf(stderr, "fread() failed\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def12]
cjson-1.7.18-build/cJSON-1.7.18/fuzzing/fuzz_main.c:42:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(argv[1], "rb")’
#   40|       }
#   41|   
#   42|->     if(fread(buf, (size_t)siz_buf, 1, f) != 1)
#   43|       {
#   44|           fprintf(stderr, "fread() failed\n");

Error: GCC_ANALYZER_WARNING (CWE-476): [#def13]
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity.h:16: included_from: Included from here.
cjson-1.7.18-build/cJSON-1.7.18/tests/cjson_add.c:28: included_from: Included from here.
cjson-1.7.18-build/cJSON-1.7.18/tests/cjson_add.c: scope_hint: In function ‘cJSON_add_object_should_add_object’
cjson-1.7.18-build/cJSON-1.7.18/tests/cjson_add.c:362:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity_internals.h:656:133: note: in definition of macro ‘UNITY_TEST_ASSERT_EQUAL_INT’
cjson-1.7.18-build/cJSON-1.7.18/tests/cjson_add.c:362:5: note: in expansion of macro ‘TEST_ASSERT_EQUAL_INT’
cjson-1.7.18-build/cJSON-1.7.18/tests/common.h:26: included_from: Included from here.
cjson-1.7.18-build/cJSON-1.7.18/tests/cjson_add.c:29: included_from: Included from here.
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity_internals.h:652:102: note: in definition of macro ‘UNITY_TEST_ASSERT’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity.h:125:100: note: in expansion of macro ‘UNITY_TEST_ASSERT_NOT_NULL’
cjson-1.7.18-build/cJSON-1.7.18/tests/cjson_add.c:361:5: note: in expansion of macro ‘TEST_ASSERT_NOT_NULL’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c: scope_hint: In function ‘cJSON_add_object_should_add_object’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity_internals.h:652:102: note: in definition of macro ‘UNITY_TEST_ASSERT’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity.h:125:100: note: in expansion of macro ‘UNITY_TEST_ASSERT_NOT_NULL’
cjson-1.7.18-build/cJSON-1.7.18/tests/cjson_add.c:361:5: note: in expansion of macro ‘TEST_ASSERT_NOT_NULL’
cjson-1.7.18-build/cJSON-1.7.18/tests/cjson_add.c: scope_hint: In function ‘cJSON_add_object_should_add_object’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity_internals.h:654:98: note: in expansion of macro ‘UNITY_TEST_ASSERT’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity.h:125:100: note: in expansion of macro ‘UNITY_TEST_ASSERT_NOT_NULL’
cjson-1.7.18-build/cJSON-1.7.18/tests/cjson_add.c:361:5: note: in expansion of macro ‘TEST_ASSERT_NOT_NULL’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity_internals.h:652:122: note: in expansion of macro ‘UNITY_TEST_FAIL’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity_internals.h:654:98: note: in expansion of macro ‘UNITY_TEST_ASSERT’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity.h:125:100: note: in expansion of macro ‘UNITY_TEST_ASSERT_NOT_NULL’
cjson-1.7.18-build/cJSON-1.7.18/tests/cjson_add.c:361:5: note: in expansion of macro ‘TEST_ASSERT_NOT_NULL’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity_internals.h:656:133: note: in definition of macro ‘UNITY_TEST_ASSERT_EQUAL_INT’
cjson-1.7.18-build/cJSON-1.7.18/tests/cjson_add.c:362:5: note: in expansion of macro ‘TEST_ASSERT_EQUAL_INT’
#  360|       cJSON_AddObjectToObject(root, "object");
#  361|       TEST_ASSERT_NOT_NULL(object = cJSON_GetObjectItemCaseSensitive(root, "object"));
#  362|->     TEST_ASSERT_EQUAL_INT(object->type, cJSON_Object);
#  363|   
#  364|       cJSON_Delete(root);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def14]
cjson-1.7.18-build/cJSON-1.7.18/tests/cjson_add.c: scope_hint: In function ‘cJSON_add_array_should_add_array’
cjson-1.7.18-build/cJSON-1.7.18/tests/cjson_add.c:397:32: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity_internals.h:656:133: note: in definition of macro ‘UNITY_TEST_ASSERT_EQUAL_INT’
cjson-1.7.18-build/cJSON-1.7.18/tests/cjson_add.c:397:5: note: in expansion of macro ‘TEST_ASSERT_EQUAL_INT’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity_internals.h:652:102: note: in definition of macro ‘UNITY_TEST_ASSERT’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity.h:125:100: note: in expansion of macro ‘UNITY_TEST_ASSERT_NOT_NULL’
cjson-1.7.18-build/cJSON-1.7.18/tests/cjson_add.c:396:5: note: in expansion of macro ‘TEST_ASSERT_NOT_NULL’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c: scope_hint: In function ‘cJSON_add_array_should_add_array’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity_internals.h:652:102: note: in definition of macro ‘UNITY_TEST_ASSERT’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity.h:125:100: note: in expansion of macro ‘UNITY_TEST_ASSERT_NOT_NULL’
cjson-1.7.18-build/cJSON-1.7.18/tests/cjson_add.c:396:5: note: in expansion of macro ‘TEST_ASSERT_NOT_NULL’
cjson-1.7.18-build/cJSON-1.7.18/tests/cjson_add.c: scope_hint: In function ‘cJSON_add_array_should_add_array’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity_internals.h:654:98: note: in expansion of macro ‘UNITY_TEST_ASSERT’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity.h:125:100: note: in expansion of macro ‘UNITY_TEST_ASSERT_NOT_NULL’
cjson-1.7.18-build/cJSON-1.7.18/tests/cjson_add.c:396:5: note: in expansion of macro ‘TEST_ASSERT_NOT_NULL’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity_internals.h:652:122: note: in expansion of macro ‘UNITY_TEST_FAIL’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity_internals.h:654:98: note: in expansion of macro ‘UNITY_TEST_ASSERT’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity.h:125:100: note: in expansion of macro ‘UNITY_TEST_ASSERT_NOT_NULL’
cjson-1.7.18-build/cJSON-1.7.18/tests/cjson_add.c:396:5: note: in expansion of macro ‘TEST_ASSERT_NOT_NULL’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity_internals.h:656:133: note: in definition of macro ‘UNITY_TEST_ASSERT_EQUAL_INT’
cjson-1.7.18-build/cJSON-1.7.18/tests/cjson_add.c:397:5: note: in expansion of macro ‘TEST_ASSERT_EQUAL_INT’
#  395|       cJSON_AddArrayToObject(root, "array");
#  396|       TEST_ASSERT_NOT_NULL(array = cJSON_GetObjectItemCaseSensitive(root, "array"));
#  397|->     TEST_ASSERT_EQUAL_INT(array->type, cJSON_Array);
#  398|   
#  399|       cJSON_Delete(root);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def15]
cjson-1.7.18-build/cJSON-1.7.18/tests/minify_tests.c: scope_hint: In function ‘cjson_minify_should_remove_single_line_comments’
cjson-1.7.18-build/cJSON-1.7.18/tests/minify_tests.c:50:5: warning[-Wanalyzer-null-argument]: use of NULL ‘minified’ where non-null expected
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity.h:16: included_from: Included from here.
cjson-1.7.18-build/cJSON-1.7.18/tests/minify_tests.c:28: included_from: Included from here.
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity_internals.h:654:98: note: in expansion of macro ‘UNITY_TEST_ASSERT’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity.h:125:100: note: in expansion of macro ‘UNITY_TEST_ASSERT_NOT_NULL’
cjson-1.7.18-build/cJSON-1.7.18/tests/minify_tests.c:49:5: note: in expansion of macro ‘TEST_ASSERT_NOT_NULL’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity_internals.h:654:98: note: in expansion of macro ‘UNITY_TEST_ASSERT’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity.h:125:100: note: in expansion of macro ‘UNITY_TEST_ASSERT_NOT_NULL’
cjson-1.7.18-build/cJSON-1.7.18/tests/minify_tests.c:49:5: note: in expansion of macro ‘TEST_ASSERT_NOT_NULL’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity_internals.h:652:122: note: in expansion of macro ‘UNITY_TEST_FAIL’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity_internals.h:654:98: note: in expansion of macro ‘UNITY_TEST_ASSERT’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity.h:125:100: note: in expansion of macro ‘UNITY_TEST_ASSERT_NOT_NULL’
cjson-1.7.18-build/cJSON-1.7.18/tests/minify_tests.c:49:5: note: in expansion of macro ‘TEST_ASSERT_NOT_NULL’
<built-in>: note: argument 1 of ‘__builtin_strcpy’ must be non-null
#   48|       char* minified = (char*) malloc(sizeof(to_minify));
#   49|       TEST_ASSERT_NOT_NULL(minified);
#   50|->     strcpy(minified, to_minify);
#   51|   
#   52|       cJSON_Minify(minified);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def16]
cjson-1.7.18-build/cJSON-1.7.18/tests/minify_tests.c: scope_hint: In function ‘cjson_minify_should_remove_spaces’
cjson-1.7.18-build/cJSON-1.7.18/tests/minify_tests.c:64:5: warning[-Wanalyzer-null-argument]: use of NULL ‘minified’ where non-null expected
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity_internals.h:654:98: note: in expansion of macro ‘UNITY_TEST_ASSERT’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity.h:125:100: note: in expansion of macro ‘UNITY_TEST_ASSERT_NOT_NULL’
cjson-1.7.18-build/cJSON-1.7.18/tests/minify_tests.c:63:5: note: in expansion of macro ‘TEST_ASSERT_NOT_NULL’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity_internals.h:654:98: note: in expansion of macro ‘UNITY_TEST_ASSERT’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity.h:125:100: note: in expansion of macro ‘UNITY_TEST_ASSERT_NOT_NULL’
cjson-1.7.18-build/cJSON-1.7.18/tests/minify_tests.c:63:5: note: in expansion of macro ‘TEST_ASSERT_NOT_NULL’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity_internals.h:652:122: note: in expansion of macro ‘UNITY_TEST_FAIL’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity_internals.h:654:98: note: in expansion of macro ‘UNITY_TEST_ASSERT’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity.h:125:100: note: in expansion of macro ‘UNITY_TEST_ASSERT_NOT_NULL’
cjson-1.7.18-build/cJSON-1.7.18/tests/minify_tests.c:63:5: note: in expansion of macro ‘TEST_ASSERT_NOT_NULL’
<built-in>: note: argument 1 of ‘__builtin_strcpy’ must be non-null
#   62|       char* minified = (char*) malloc(sizeof(to_minify));
#   63|       TEST_ASSERT_NOT_NULL(minified);
#   64|->     strcpy(minified, to_minify);
#   65|   
#   66|       cJSON_Minify(minified);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def17]
cjson-1.7.18-build/cJSON-1.7.18/tests/minify_tests.c: scope_hint: In function ‘cjson_minify_should_remove_multiline_comments’
cjson-1.7.18-build/cJSON-1.7.18/tests/minify_tests.c:78:5: warning[-Wanalyzer-null-argument]: use of NULL ‘minified’ where non-null expected
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity_internals.h:654:98: note: in expansion of macro ‘UNITY_TEST_ASSERT’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity.h:125:100: note: in expansion of macro ‘UNITY_TEST_ASSERT_NOT_NULL’
cjson-1.7.18-build/cJSON-1.7.18/tests/minify_tests.c:77:5: note: in expansion of macro ‘TEST_ASSERT_NOT_NULL’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity_internals.h:654:98: note: in expansion of macro ‘UNITY_TEST_ASSERT’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity.h:125:100: note: in expansion of macro ‘UNITY_TEST_ASSERT_NOT_NULL’
cjson-1.7.18-build/cJSON-1.7.18/tests/minify_tests.c:77:5: note: in expansion of macro ‘TEST_ASSERT_NOT_NULL’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity_internals.h:652:122: note: in expansion of macro ‘UNITY_TEST_FAIL’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity_internals.h:654:98: note: in expansion of macro ‘UNITY_TEST_ASSERT’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity.h:125:100: note: in expansion of macro ‘UNITY_TEST_ASSERT_NOT_NULL’
cjson-1.7.18-build/cJSON-1.7.18/tests/minify_tests.c:77:5: note: in expansion of macro ‘TEST_ASSERT_NOT_NULL’
<built-in>: note: argument 1 of ‘__builtin_strcpy’ must be non-null
#   76|       char* minified = (char*) malloc(sizeof(to_minify));
#   77|       TEST_ASSERT_NOT_NULL(minified);
#   78|->     strcpy(minified, to_minify);
#   79|   
#   80|       cJSON_Minify(minified);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def18]
cjson-1.7.18-build/cJSON-1.7.18/tests/minify_tests.c: scope_hint: In function ‘cjson_minify_should_not_modify_strings’
cjson-1.7.18-build/cJSON-1.7.18/tests/minify_tests.c:92:5: warning[-Wanalyzer-null-argument]: use of NULL ‘minified’ where non-null expected
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity_internals.h:654:98: note: in expansion of macro ‘UNITY_TEST_ASSERT’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity.h:125:100: note: in expansion of macro ‘UNITY_TEST_ASSERT_NOT_NULL’
cjson-1.7.18-build/cJSON-1.7.18/tests/minify_tests.c:91:5: note: in expansion of macro ‘TEST_ASSERT_NOT_NULL’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity_internals.h:654:98: note: in expansion of macro ‘UNITY_TEST_ASSERT’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity.h:125:100: note: in expansion of macro ‘UNITY_TEST_ASSERT_NOT_NULL’
cjson-1.7.18-build/cJSON-1.7.18/tests/minify_tests.c:91:5: note: in expansion of macro ‘TEST_ASSERT_NOT_NULL’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity_internals.h:652:122: note: in expansion of macro ‘UNITY_TEST_FAIL’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity_internals.h:654:98: note: in expansion of macro ‘UNITY_TEST_ASSERT’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity.h:125:100: note: in expansion of macro ‘UNITY_TEST_ASSERT_NOT_NULL’
cjson-1.7.18-build/cJSON-1.7.18/tests/minify_tests.c:91:5: note: in expansion of macro ‘TEST_ASSERT_NOT_NULL’
<built-in>: note: argument 1 of ‘__builtin_strcpy’ must be non-null
#   90|       char* minified = (char*) malloc(sizeof(to_minify));
#   91|       TEST_ASSERT_NOT_NULL(minified);
#   92|->     strcpy(minified, to_minify);
#   93|   
#   94|       cJSON_Minify(minified);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def19]
cjson-1.7.18-build/cJSON-1.7.18/tests/minify_tests.c: scope_hint: In function ‘cjson_minify_should_minify_json’
cjson-1.7.18-build/cJSON-1.7.18/tests/minify_tests.c:147:5: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘buffer’ where non-null expected
<built-in>: note: argument 1 of ‘__builtin_strcpy’ must be non-null
#  145|   
#  146|       char *buffer = (char*) malloc(sizeof(to_minify));
#  147|->     strcpy(buffer, to_minify);
#  148|   
#  149|       cJSON_Minify(buffer);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def20]
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity.h:16: included_from: Included from here.
cjson-1.7.18-build/cJSON-1.7.18/tests/misc_tests.c:28: included_from: Included from here.
cjson-1.7.18-build/cJSON-1.7.18/tests/misc_tests.c: scope_hint: In function ‘cjson_set_valuestring_to_object_should_not_leak_memory’
cjson-1.7.18-build/cJSON-1.7.18/tests/misc_tests.c:661:81: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity_internals.h:730:160: note: in definition of macro ‘UNITY_TEST_ASSERT_EQUAL_STRING’
cjson-1.7.18-build/cJSON-1.7.18/tests/misc_tests.c:661:5: note: in expansion of macro ‘TEST_ASSERT_EQUAL_STRING’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c: scope_hint: In function ‘cjson_set_valuestring_to_object_should_not_leak_memory’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:1080:9: note: in expansion of macro ‘can_access_at_index’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:1080:9: note: in expansion of macro ‘can_access_at_index’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:302:49: note: in expansion of macro ‘can_access_at_index’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:1054:9: note: in expansion of macro ‘cannot_access_at_index’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:1054:9: note: in expansion of macro ‘cannot_access_at_index’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:1059:12: note: in expansion of macro ‘can_access_at_index’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:1334:9: note: in expansion of macro ‘can_read’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:1334:9: note: in expansion of macro ‘can_read’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:1341:9: note: in expansion of macro ‘can_read’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:1341:9: note: in expansion of macro ‘can_read’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:1348:9: note: in expansion of macro ‘can_read’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:1348:9: note: in expansion of macro ‘can_read’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:1356:9: note: in expansion of macro ‘can_access_at_index’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:1356:9: note: in expansion of macro ‘can_access_at_index’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:1361:9: note: in expansion of macro ‘can_access_at_index’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:1361:9: note: in expansion of macro ‘can_access_at_index’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:1366:9: note: in expansion of macro ‘can_access_at_index’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:1366:9: note: in expansion of macro ‘can_access_at_index’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:1371:9: note: in expansion of macro ‘can_access_at_index’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:1371:9: note: in expansion of macro ‘can_access_at_index’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:1625:9: note: in expansion of macro ‘cannot_access_at_index’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:302:49: note: in expansion of macro ‘can_access_at_index’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:1054:9: note: in expansion of macro ‘cannot_access_at_index’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:1054:9: note: in expansion of macro ‘cannot_access_at_index’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:1059:12: note: in expansion of macro ‘can_access_at_index’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:1632:9: note: in expansion of macro ‘can_access_at_index’
cjson-1.7.18-build/cJSON-1.7.18/tests/misc_tests.c: scope_hint: In function ‘cjson_set_valuestring_to_object_should_not_leak_memory’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c: scope_hint: In function ‘cjson_set_valuestring_to_object_should_not_leak_memory’
cjson-1.7.18-build/cJSON-1.7.18/tests/misc_tests.c: scope_hint: In function ‘cjson_set_valuestring_to_object_should_not_leak_memory’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c: scope_hint: In function ‘cjson_set_valuestring_to_object_should_not_leak_memory’
cjson-1.7.18-build/cJSON-1.7.18/tests/misc_tests.c: scope_hint: In function ‘cjson_set_valuestring_to_object_should_not_leak_memory’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c: scope_hint: In function ‘cjson_set_valuestring_to_object_should_not_leak_memory’
cjson-1.7.18-build/cJSON-1.7.18/tests/misc_tests.c: scope_hint: In function ‘cjson_set_valuestring_to_object_should_not_leak_memory’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity_internals.h:654:98: note: in expansion of macro ‘UNITY_TEST_ASSERT’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity.h:125:100: note: in expansion of macro ‘UNITY_TEST_ASSERT_NOT_NULL’
cjson-1.7.18-build/cJSON-1.7.18/tests/misc_tests.c:659:5: note: in expansion of macro ‘TEST_ASSERT_NOT_NULL’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity_internals.h:652:122: note: in expansion of macro ‘UNITY_TEST_FAIL’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity_internals.h:654:98: note: in expansion of macro ‘UNITY_TEST_ASSERT’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity.h:125:100: note: in expansion of macro ‘UNITY_TEST_ASSERT_NOT_NULL’
cjson-1.7.18-build/cJSON-1.7.18/tests/misc_tests.c:659:5: note: in expansion of macro ‘TEST_ASSERT_NOT_NULL’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity_internals.h:730:160: note: in definition of macro ‘UNITY_TEST_ASSERT_EQUAL_STRING’
cjson-1.7.18-build/cJSON-1.7.18/tests/misc_tests.c:661:5: note: in expansion of macro ‘TEST_ASSERT_EQUAL_STRING’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c: scope_hint: In function ‘cjson_set_valuestring_to_object_should_not_leak_memory’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity_internals.h:730:160: note: in definition of macro ‘UNITY_TEST_ASSERT_EQUAL_STRING’
cjson-1.7.18-build/cJSON-1.7.18/tests/misc_tests.c:661:5: note: in expansion of macro ‘TEST_ASSERT_EQUAL_STRING’
cjson-1.7.18-build/cJSON-1.7.18/tests/misc_tests.c: scope_hint: In function ‘cjson_set_valuestring_to_object_should_not_leak_memory’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity_internals.h:730:160: note: in definition of macro ‘UNITY_TEST_ASSERT_EQUAL_STRING’
cjson-1.7.18-build/cJSON-1.7.18/tests/misc_tests.c:661:5: note: in expansion of macro ‘TEST_ASSERT_EQUAL_STRING’
#  659|       TEST_ASSERT_NOT_NULL(return_value);
#  660|       TEST_ASSERT_EQUAL_PTR_MESSAGE(ptr1, return_value, "new valuestring shorter than old should not reallocate memory");
#  661|->     TEST_ASSERT_EQUAL_STRING(short_valuestring, cJSON_GetObjectItem(root, "one")->valuestring);
#  662|   
#  663|       /* we needn't to free the original valuestring manually */

Error: GCC_ANALYZER_WARNING (CWE-476): [#def21]
cjson-1.7.18-build/cJSON-1.7.18/tests/misc_tests.c:668:80: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity_internals.h:730:160: note: in definition of macro ‘UNITY_TEST_ASSERT_EQUAL_STRING’
cjson-1.7.18-build/cJSON-1.7.18/tests/misc_tests.c:668:5: note: in expansion of macro ‘TEST_ASSERT_EQUAL_STRING’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c: scope_hint: In function ‘cjson_set_valuestring_to_object_should_not_leak_memory’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:1080:9: note: in expansion of macro ‘can_access_at_index’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:1080:9: note: in expansion of macro ‘can_access_at_index’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:302:49: note: in expansion of macro ‘can_access_at_index’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:1054:9: note: in expansion of macro ‘cannot_access_at_index’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:1054:9: note: in expansion of macro ‘cannot_access_at_index’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:1059:12: note: in expansion of macro ‘can_access_at_index’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:1334:9: note: in expansion of macro ‘can_read’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:1334:9: note: in expansion of macro ‘can_read’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:1341:9: note: in expansion of macro ‘can_read’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:1341:9: note: in expansion of macro ‘can_read’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:1348:9: note: in expansion of macro ‘can_read’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:1348:9: note: in expansion of macro ‘can_read’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:1356:9: note: in expansion of macro ‘can_access_at_index’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:1356:9: note: in expansion of macro ‘can_access_at_index’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:1361:9: note: in expansion of macro ‘can_access_at_index’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:1361:9: note: in expansion of macro ‘can_access_at_index’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:1366:9: note: in expansion of macro ‘can_access_at_index’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:1366:9: note: in expansion of macro ‘can_access_at_index’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:1371:9: note: in expansion of macro ‘can_access_at_index’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:1371:9: note: in expansion of macro ‘can_access_at_index’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:1625:9: note: in expansion of macro ‘cannot_access_at_index’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:302:49: note: in expansion of macro ‘can_access_at_index’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:1054:9: note: in expansion of macro ‘cannot_access_at_index’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:1054:9: note: in expansion of macro ‘cannot_access_at_index’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:1059:12: note: in expansion of macro ‘can_access_at_index’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c:1632:9: note: in expansion of macro ‘can_access_at_index’
cjson-1.7.18-build/cJSON-1.7.18/tests/misc_tests.c: scope_hint: In function ‘cjson_set_valuestring_to_object_should_not_leak_memory’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c: scope_hint: In function ‘cjson_set_valuestring_to_object_should_not_leak_memory’
cjson-1.7.18-build/cJSON-1.7.18/tests/misc_tests.c: scope_hint: In function ‘cjson_set_valuestring_to_object_should_not_leak_memory’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c: scope_hint: In function ‘cjson_set_valuestring_to_object_should_not_leak_memory’
cjson-1.7.18-build/cJSON-1.7.18/tests/misc_tests.c: scope_hint: In function ‘cjson_set_valuestring_to_object_should_not_leak_memory’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c: scope_hint: In function ‘cjson_set_valuestring_to_object_should_not_leak_memory’
cjson-1.7.18-build/cJSON-1.7.18/tests/misc_tests.c: scope_hint: In function ‘cjson_set_valuestring_to_object_should_not_leak_memory’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity_internals.h:654:98: note: in expansion of macro ‘UNITY_TEST_ASSERT’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity.h:125:100: note: in expansion of macro ‘UNITY_TEST_ASSERT_NOT_NULL’
cjson-1.7.18-build/cJSON-1.7.18/tests/misc_tests.c:659:5: note: in expansion of macro ‘TEST_ASSERT_NOT_NULL’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity_internals.h:652:122: note: in expansion of macro ‘UNITY_TEST_FAIL’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity_internals.h:654:98: note: in expansion of macro ‘UNITY_TEST_ASSERT’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity.h:125:100: note: in expansion of macro ‘UNITY_TEST_ASSERT_NOT_NULL’
cjson-1.7.18-build/cJSON-1.7.18/tests/misc_tests.c:659:5: note: in expansion of macro ‘TEST_ASSERT_NOT_NULL’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity_internals.h:730:160: note: in definition of macro ‘UNITY_TEST_ASSERT_EQUAL_STRING’
cjson-1.7.18-build/cJSON-1.7.18/tests/misc_tests.c:661:5: note: in expansion of macro ‘TEST_ASSERT_EQUAL_STRING’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c: scope_hint: In function ‘cjson_set_valuestring_to_object_should_not_leak_memory’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity_internals.h:730:160: note: in definition of macro ‘UNITY_TEST_ASSERT_EQUAL_STRING’
cjson-1.7.18-build/cJSON-1.7.18/tests/misc_tests.c:661:5: note: in expansion of macro ‘TEST_ASSERT_EQUAL_STRING’
cjson-1.7.18-build/cJSON-1.7.18/tests/misc_tests.c: scope_hint: In function ‘cjson_set_valuestring_to_object_should_not_leak_memory’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c: scope_hint: In function ‘cjson_set_valuestring_to_object_should_not_leak_memory’
cjson-1.7.18-build/cJSON-1.7.18/tests/misc_tests.c: scope_hint: In function ‘cjson_set_valuestring_to_object_should_not_leak_memory’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity_internals.h:654:98: note: in expansion of macro ‘UNITY_TEST_ASSERT’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity.h:125:100: note: in expansion of macro ‘UNITY_TEST_ASSERT_NOT_NULL’
cjson-1.7.18-build/cJSON-1.7.18/tests/misc_tests.c:666:5: note: in expansion of macro ‘TEST_ASSERT_NOT_NULL’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity_internals.h:652:122: note: in expansion of macro ‘UNITY_TEST_FAIL’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity_internals.h:654:98: note: in expansion of macro ‘UNITY_TEST_ASSERT’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity.h:125:100: note: in expansion of macro ‘UNITY_TEST_ASSERT_NOT_NULL’
cjson-1.7.18-build/cJSON-1.7.18/tests/misc_tests.c:666:5: note: in expansion of macro ‘TEST_ASSERT_NOT_NULL’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity_internals.h:730:160: note: in definition of macro ‘UNITY_TEST_ASSERT_EQUAL_STRING’
cjson-1.7.18-build/cJSON-1.7.18/tests/misc_tests.c:668:5: note: in expansion of macro ‘TEST_ASSERT_EQUAL_STRING’
cjson-1.7.18-build/cJSON-1.7.18/cJSON.c: scope_hint: In function ‘cjson_set_valuestring_to_object_should_not_leak_memory’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity_internals.h:730:160: note: in definition of macro ‘UNITY_TEST_ASSERT_EQUAL_STRING’
cjson-1.7.18-build/cJSON-1.7.18/tests/misc_tests.c:668:5: note: in expansion of macro ‘TEST_ASSERT_EQUAL_STRING’
cjson-1.7.18-build/cJSON-1.7.18/tests/misc_tests.c: scope_hint: In function ‘cjson_set_valuestring_to_object_should_not_leak_memory’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity_internals.h:730:160: note: in definition of macro ‘UNITY_TEST_ASSERT_EQUAL_STRING’
cjson-1.7.18-build/cJSON-1.7.18/tests/misc_tests.c:668:5: note: in expansion of macro ‘TEST_ASSERT_EQUAL_STRING’
#  666|       TEST_ASSERT_NOT_NULL(return_value);
#  667|       TEST_ASSERT_NOT_EQUAL_MESSAGE(ptr1, return_value, "new valuestring longer than old should reallocate memory")
#  668|->     TEST_ASSERT_EQUAL_STRING(long_valuestring, cJSON_GetObjectItem(root, "one")->valuestring);
#  669|   
#  670|       return_value = cJSON_SetValuestring(cJSON_GetObjectItem(root, "two"), long_valuestring);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def22]
cjson-1.7.18-build/cJSON-1.7.18/tests/misc_tests.c: scope_hint: In function ‘deallocated_pointers_should_be_set_to_null’
cjson-1.7.18-build/cJSON-1.7.18/tests/misc_tests.c:744:16: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
#  742|   
#  743|       cJSON_Delete(string);
#  744|->     free(string->valuestring);
#  745|   
#  746|       cJSON_AddObjectToObject(root, "object");

Error: GCC_ANALYZER_WARNING (CWE-476): [#def23]
cjson-1.7.18-build/cJSON-1.7.18/tests/misc_tests.c:747:22: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘cJSON_CreateObject()’
#  745|   
#  746|       cJSON_AddObjectToObject(root, "object");
#  747|->     cJSON_Delete(root->child);
#  748|       free(root->child->string);
#  749|   #endif

Error: GCC_ANALYZER_WARNING (CWE-688): [#def24]
cjson-1.7.18-build/cJSON-1.7.18/tests/parse_examples.c: scope_hint: In function ‘test15_should_not_heap_buffer_overflow’
cjson-1.7.18-build/cJSON-1.7.18/tests/parse_examples.c:272:9: warning[-Wanalyzer-null-argument]: use of NULL ‘exact_size_heap’ where non-null expected
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity.h:16: included_from: Included from here.
cjson-1.7.18-build/cJSON-1.7.18/tests/parse_examples.c:28: included_from: Included from here.
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity_internals.h:654:98: note: in expansion of macro ‘UNITY_TEST_ASSERT’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity.h:125:100: note: in expansion of macro ‘UNITY_TEST_ASSERT_NOT_NULL’
cjson-1.7.18-build/cJSON-1.7.18/tests/parse_examples.c:270:9: note: in expansion of macro ‘TEST_ASSERT_NOT_NULL’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity_internals.h:654:98: note: in expansion of macro ‘UNITY_TEST_ASSERT’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity.h:125:100: note: in expansion of macro ‘UNITY_TEST_ASSERT_NOT_NULL’
cjson-1.7.18-build/cJSON-1.7.18/tests/parse_examples.c:270:9: note: in expansion of macro ‘TEST_ASSERT_NOT_NULL’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity_internals.h:652:122: note: in expansion of macro ‘UNITY_TEST_FAIL’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity_internals.h:654:98: note: in expansion of macro ‘UNITY_TEST_ASSERT’
cjson-1.7.18-build/cJSON-1.7.18/tests/unity/src/unity.h:125:100: note: in expansion of macro ‘UNITY_TEST_ASSERT_NOT_NULL’
cjson-1.7.18-build/cJSON-1.7.18/tests/parse_examples.c:270:9: note: in expansion of macro ‘TEST_ASSERT_NOT_NULL’
<built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null
#  270|           TEST_ASSERT_NOT_NULL(exact_size_heap);
#  271|   
#  272|->         memcpy(exact_size_heap, json_string, len);
#  273|           json = cJSON_ParseWithLength(exact_size_heap, len);
#  274|   

Scan Properties

analyzer-version-clippy1.82.0
analyzer-version-cppcheck2.16.0
analyzer-version-gcc14.2.1
analyzer-version-gcc-analyzer15.0.0
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-14.us-west-2.compute.internal
mock-configfedora-rawhide-gcc-latest-x86_64
project-namecjson-1.7.18-1.fc42
store-results-to/tmp/tmppr6aj5rw/cjson-1.7.18-1.fc42.tar.xz
time-created2024-11-12 23:29:55
time-finished2024-11-12 23:31:41
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmppr6aj5rw/cjson-1.7.18-1.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmppr6aj5rw/cjson-1.7.18-1.fc42.src.rpm'
tool-versioncsmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9