cjson-1.7.17-1.fc41

List of Defects

Error: CPPCHECK_WARNING: [#def1]
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

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

Error: GCC_ANALYZER_WARNING (CWE-126): [#def3]
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c: scope_hint: In function ‘skip_multiline_comment’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c:2816:20: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c:2816:20: note: read of 1 byte from after the end of ‘string’
cjson-1.7.17-build/cJSON-1.7.17/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] == '*') && ((*input)[1] == '/'))

Error: GCC_ANALYZER_WARNING (CWE-126): [#def4]
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c:2818:46: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c:2818:46: note: read of 1 byte from after the end of ‘string’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c:2818:46: note: valid subscripts for ‘string’ are ‘[0]’ to ‘[6]’
#                                                 └───────────────────────┘
#                                                             ^
# 2816|       for (; (*input)[0] != '\0'; ++(*input))
# 2817|       {
# 2818|->         if (((*input)[0] == '*') && ((*input)[1] == '/'))
# 2819|           {
# 2820|               *input += static_strlen("*/");

Error: GCC_ANALYZER_WARNING (CWE-126): [#def5]
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c: scope_hint: In function ‘minify_string’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c:2840:54: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c:2840:54: note: read of 1 byte from after the end of ‘string’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c:2840:54: note: valid subscripts for ‘string’ are ‘[0]’ to ‘[6]’
#                                                 └───────────────────────┘
#                                                             ^
# 2838|               *output += static_strlen("\"");
# 2839|               return;
# 2840|->         } else if (((*input)[0] == '\\') && ((*input)[1] == '\"')) {
# 2841|               (*output)[1] = (*input)[1];
# 2842|               *input += static_strlen("\"");

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

Error: GCC_ANALYZER_WARNING (CWE-126): [#def7]
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c: scope_hint: In function ‘cJSON_Minify’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c:2869:25: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c:2869:25: note: read of 1 byte from after the end of ‘pending_escape’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c:2869:25: note: valid subscripts for ‘pending_escape’ are ‘[0]’ to ‘[2]’
#                                                 └───────────────────────┘
#                                                             ^
# 2867|   
# 2868|               case '/':
# 2869|->                 if (json[1] == '/')
# 2870|                   {
# 2871|                       skip_oneline_comment(&json);

Error: CPPCHECK_WARNING: [#def8]
cjson-1.7.17-build/cJSON-1.7.17/fuzzing/cjson_read_fuzzer.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-775): [#def9]
cjson-1.7.17-build/cJSON-1.7.17/fuzzing/fuzz_main.c: scope_hint: In function ‘main’
cjson-1.7.17-build/cJSON-1.7.17/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): [#def10]
cjson-1.7.17-build/cJSON-1.7.17/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): [#def11]
cjson-1.7.17-build/cJSON-1.7.17/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): [#def12]
cjson-1.7.17-build/cJSON-1.7.17/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): [#def13]
cjson-1.7.17-build/cJSON-1.7.17/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): [#def14]
cjson-1.7.17-build/cJSON-1.7.17/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: CPPCHECK_WARNING: [#def15]
cjson-1.7.17-build/cJSON-1.7.17/test.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def16]
cjson-1.7.17-build/cJSON-1.7.17/tests/cjson_add.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def17]
cjson-1.7.17-build/cJSON-1.7.17/tests/cjson_add.c:126:5: warning[unix.Malloc]: Potential memory leak
#  124|       cJSON_InitHooks(&failing_hooks);
#  125|   
#  126|->     TEST_ASSERT_NULL(cJSON_CreateIntArray(numbers, 3));
#  127|   
#  128|       cJSON_InitHooks(NULL);

Error: CLANG_WARNING: [#def18]
cjson-1.7.17-build/cJSON-1.7.17/tests/cjson_add.c:137:5: warning[unix.Malloc]: Potential memory leak
#  135|       cJSON_InitHooks(&failing_hooks);
#  136|   
#  137|->     TEST_ASSERT_NULL(cJSON_CreateFloatArray(numbers, 3));
#  138|   
#  139|       cJSON_InitHooks(NULL);

Error: CLANG_WARNING: [#def19]
cjson-1.7.17-build/cJSON-1.7.17/tests/cjson_add.c:148:5: warning[unix.Malloc]: Potential memory leak
#  146|       cJSON_InitHooks(&failing_hooks);
#  147|   
#  148|->     TEST_ASSERT_NULL(cJSON_CreateDoubleArray(numbers, 3));
#  149|   
#  150|       cJSON_InitHooks(NULL);

Error: CLANG_WARNING: [#def20]
cjson-1.7.17-build/cJSON-1.7.17/tests/cjson_add.c:159:5: warning[unix.Malloc]: Potential memory leak
#  157|       cJSON_InitHooks(&failing_hooks);
#  158|   
#  159|->     TEST_ASSERT_NULL(cJSON_CreateStringArray(strings, 3));
#  160|   
#  161|       cJSON_InitHooks(NULL);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def21]
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity.h:16: included_from: Included from here.
cjson-1.7.17-build/cJSON-1.7.17/tests/cjson_add.c:28: included_from: Included from here.
cjson-1.7.17-build/cJSON-1.7.17/tests/cjson_add.c: scope_hint: In function ‘cjson_add_raw_should_add_raw’
cjson-1.7.17-build/cJSON-1.7.17/tests/cjson_add.c:326:30: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity_internals.h:656:133: note: in definition of macro ‘UNITY_TEST_ASSERT_EQUAL_INT’
cjson-1.7.17-build/cJSON-1.7.17/tests/cjson_add.c:326:5: note: in expansion of macro ‘TEST_ASSERT_EQUAL_INT’
cjson-1.7.17-build/cJSON-1.7.17/tests/common.h:26: included_from: Included from here.
cjson-1.7.17-build/cJSON-1.7.17/tests/cjson_add.c:29: included_from: Included from here.
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity_internals.h:652:102: note: in definition of macro ‘UNITY_TEST_ASSERT’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity.h:125:100: note: in expansion of macro ‘UNITY_TEST_ASSERT_NOT_NULL’
cjson-1.7.17-build/cJSON-1.7.17/tests/cjson_add.c:325:5: note: in expansion of macro ‘TEST_ASSERT_NOT_NULL’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c: scope_hint: In function ‘cjson_add_raw_should_add_raw’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity_internals.h:652:102: note: in definition of macro ‘UNITY_TEST_ASSERT’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity.h:125:100: note: in expansion of macro ‘UNITY_TEST_ASSERT_NOT_NULL’
cjson-1.7.17-build/cJSON-1.7.17/tests/cjson_add.c:325:5: note: in expansion of macro ‘TEST_ASSERT_NOT_NULL’
cjson-1.7.17-build/cJSON-1.7.17/tests/cjson_add.c: scope_hint: In function ‘cjson_add_raw_should_add_raw’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity_internals.h:654:98: note: in expansion of macro ‘UNITY_TEST_ASSERT’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity.h:125:100: note: in expansion of macro ‘UNITY_TEST_ASSERT_NOT_NULL’
cjson-1.7.17-build/cJSON-1.7.17/tests/cjson_add.c:325:5: note: in expansion of macro ‘TEST_ASSERT_NOT_NULL’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity_internals.h:652:122: note: in expansion of macro ‘UNITY_TEST_FAIL’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity_internals.h:654:98: note: in expansion of macro ‘UNITY_TEST_ASSERT’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity.h:125:100: note: in expansion of macro ‘UNITY_TEST_ASSERT_NOT_NULL’
cjson-1.7.17-build/cJSON-1.7.17/tests/cjson_add.c:325:5: note: in expansion of macro ‘TEST_ASSERT_NOT_NULL’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity_internals.h:656:133: note: in definition of macro ‘UNITY_TEST_ASSERT_EQUAL_INT’
cjson-1.7.17-build/cJSON-1.7.17/tests/cjson_add.c:326:5: note: in expansion of macro ‘TEST_ASSERT_EQUAL_INT’
#  324|   
#  325|       TEST_ASSERT_NOT_NULL(raw = cJSON_GetObjectItemCaseSensitive(root, "raw"));
#  326|->     TEST_ASSERT_EQUAL_INT(raw->type, cJSON_Raw);
#  327|       TEST_ASSERT_EQUAL_STRING(raw->valuestring, "{}");
#  328|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def22]
cjson-1.7.17-build/cJSON-1.7.17/tests/cjson_add.c: scope_hint: In function ‘cJSON_add_object_should_add_object’
cjson-1.7.17-build/cJSON-1.7.17/tests/cjson_add.c:362:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity_internals.h:656:133: note: in definition of macro ‘UNITY_TEST_ASSERT_EQUAL_INT’
cjson-1.7.17-build/cJSON-1.7.17/tests/cjson_add.c:362:5: note: in expansion of macro ‘TEST_ASSERT_EQUAL_INT’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity_internals.h:652:102: note: in definition of macro ‘UNITY_TEST_ASSERT’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity.h:125:100: note: in expansion of macro ‘UNITY_TEST_ASSERT_NOT_NULL’
cjson-1.7.17-build/cJSON-1.7.17/tests/cjson_add.c:361:5: note: in expansion of macro ‘TEST_ASSERT_NOT_NULL’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c: scope_hint: In function ‘cJSON_add_object_should_add_object’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity_internals.h:652:102: note: in definition of macro ‘UNITY_TEST_ASSERT’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity.h:125:100: note: in expansion of macro ‘UNITY_TEST_ASSERT_NOT_NULL’
cjson-1.7.17-build/cJSON-1.7.17/tests/cjson_add.c:361:5: note: in expansion of macro ‘TEST_ASSERT_NOT_NULL’
cjson-1.7.17-build/cJSON-1.7.17/tests/cjson_add.c: scope_hint: In function ‘cJSON_add_object_should_add_object’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity_internals.h:654:98: note: in expansion of macro ‘UNITY_TEST_ASSERT’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity.h:125:100: note: in expansion of macro ‘UNITY_TEST_ASSERT_NOT_NULL’
cjson-1.7.17-build/cJSON-1.7.17/tests/cjson_add.c:361:5: note: in expansion of macro ‘TEST_ASSERT_NOT_NULL’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity_internals.h:652:122: note: in expansion of macro ‘UNITY_TEST_FAIL’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity_internals.h:654:98: note: in expansion of macro ‘UNITY_TEST_ASSERT’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity.h:125:100: note: in expansion of macro ‘UNITY_TEST_ASSERT_NOT_NULL’
cjson-1.7.17-build/cJSON-1.7.17/tests/cjson_add.c:361:5: note: in expansion of macro ‘TEST_ASSERT_NOT_NULL’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity_internals.h:656:133: note: in definition of macro ‘UNITY_TEST_ASSERT_EQUAL_INT’
cjson-1.7.17-build/cJSON-1.7.17/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): [#def23]
cjson-1.7.17-build/cJSON-1.7.17/tests/cjson_add.c: scope_hint: In function ‘cJSON_add_array_should_add_array’
cjson-1.7.17-build/cJSON-1.7.17/tests/cjson_add.c:397:32: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity_internals.h:656:133: note: in definition of macro ‘UNITY_TEST_ASSERT_EQUAL_INT’
cjson-1.7.17-build/cJSON-1.7.17/tests/cjson_add.c:397:5: note: in expansion of macro ‘TEST_ASSERT_EQUAL_INT’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity_internals.h:652:102: note: in definition of macro ‘UNITY_TEST_ASSERT’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity.h:125:100: note: in expansion of macro ‘UNITY_TEST_ASSERT_NOT_NULL’
cjson-1.7.17-build/cJSON-1.7.17/tests/cjson_add.c:396:5: note: in expansion of macro ‘TEST_ASSERT_NOT_NULL’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c: scope_hint: In function ‘cJSON_add_array_should_add_array’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity_internals.h:652:102: note: in definition of macro ‘UNITY_TEST_ASSERT’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity.h:125:100: note: in expansion of macro ‘UNITY_TEST_ASSERT_NOT_NULL’
cjson-1.7.17-build/cJSON-1.7.17/tests/cjson_add.c:396:5: note: in expansion of macro ‘TEST_ASSERT_NOT_NULL’
cjson-1.7.17-build/cJSON-1.7.17/tests/cjson_add.c: scope_hint: In function ‘cJSON_add_array_should_add_array’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity_internals.h:654:98: note: in expansion of macro ‘UNITY_TEST_ASSERT’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity.h:125:100: note: in expansion of macro ‘UNITY_TEST_ASSERT_NOT_NULL’
cjson-1.7.17-build/cJSON-1.7.17/tests/cjson_add.c:396:5: note: in expansion of macro ‘TEST_ASSERT_NOT_NULL’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity_internals.h:652:122: note: in expansion of macro ‘UNITY_TEST_FAIL’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity_internals.h:654:98: note: in expansion of macro ‘UNITY_TEST_ASSERT’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity.h:125:100: note: in expansion of macro ‘UNITY_TEST_ASSERT_NOT_NULL’
cjson-1.7.17-build/cJSON-1.7.17/tests/cjson_add.c:396:5: note: in expansion of macro ‘TEST_ASSERT_NOT_NULL’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity_internals.h:656:133: note: in definition of macro ‘UNITY_TEST_ASSERT_EQUAL_INT’
cjson-1.7.17-build/cJSON-1.7.17/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: CLANG_WARNING: [#def24]
cjson-1.7.17-build/cJSON-1.7.17/tests/cjson_add.c:418:5: warning[unix.Malloc]: Potential memory leak
#  416|       cJSON_InitHooks(&failing_hooks);
#  417|   
#  418|->     TEST_ASSERT_NULL(cJSON_AddArrayToObject(root, "array"));
#  419|   
#  420|       cJSON_InitHooks(NULL);

Error: CPPCHECK_WARNING: [#def25]
cjson-1.7.17-build/cJSON-1.7.17/tests/compare_tests.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def26]
cjson-1.7.17-build/cJSON-1.7.17/tests/minify_tests.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-688): [#def27]
cjson-1.7.17-build/cJSON-1.7.17/tests/minify_tests.c: scope_hint: In function ‘cjson_minify_should_remove_single_line_comments’
cjson-1.7.17-build/cJSON-1.7.17/tests/minify_tests.c:50:5: warning[-Wanalyzer-null-argument]: use of NULL ‘minified’ where non-null expected
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity.h:16: included_from: Included from here.
cjson-1.7.17-build/cJSON-1.7.17/tests/minify_tests.c:28: included_from: Included from here.
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity_internals.h:654:98: note: in expansion of macro ‘UNITY_TEST_ASSERT’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity.h:125:100: note: in expansion of macro ‘UNITY_TEST_ASSERT_NOT_NULL’
cjson-1.7.17-build/cJSON-1.7.17/tests/minify_tests.c:49:5: note: in expansion of macro ‘TEST_ASSERT_NOT_NULL’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity_internals.h:654:98: note: in expansion of macro ‘UNITY_TEST_ASSERT’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity.h:125:100: note: in expansion of macro ‘UNITY_TEST_ASSERT_NOT_NULL’
cjson-1.7.17-build/cJSON-1.7.17/tests/minify_tests.c:49:5: note: in expansion of macro ‘TEST_ASSERT_NOT_NULL’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity_internals.h:652:122: note: in expansion of macro ‘UNITY_TEST_FAIL’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity_internals.h:654:98: note: in expansion of macro ‘UNITY_TEST_ASSERT’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity.h:125:100: note: in expansion of macro ‘UNITY_TEST_ASSERT_NOT_NULL’
cjson-1.7.17-build/cJSON-1.7.17/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): [#def28]
cjson-1.7.17-build/cJSON-1.7.17/tests/minify_tests.c: scope_hint: In function ‘cjson_minify_should_remove_spaces’
cjson-1.7.17-build/cJSON-1.7.17/tests/minify_tests.c:64:5: warning[-Wanalyzer-null-argument]: use of NULL ‘minified’ where non-null expected
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity_internals.h:654:98: note: in expansion of macro ‘UNITY_TEST_ASSERT’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity.h:125:100: note: in expansion of macro ‘UNITY_TEST_ASSERT_NOT_NULL’
cjson-1.7.17-build/cJSON-1.7.17/tests/minify_tests.c:63:5: note: in expansion of macro ‘TEST_ASSERT_NOT_NULL’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity_internals.h:654:98: note: in expansion of macro ‘UNITY_TEST_ASSERT’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity.h:125:100: note: in expansion of macro ‘UNITY_TEST_ASSERT_NOT_NULL’
cjson-1.7.17-build/cJSON-1.7.17/tests/minify_tests.c:63:5: note: in expansion of macro ‘TEST_ASSERT_NOT_NULL’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity_internals.h:652:122: note: in expansion of macro ‘UNITY_TEST_FAIL’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity_internals.h:654:98: note: in expansion of macro ‘UNITY_TEST_ASSERT’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity.h:125:100: note: in expansion of macro ‘UNITY_TEST_ASSERT_NOT_NULL’
cjson-1.7.17-build/cJSON-1.7.17/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): [#def29]
cjson-1.7.17-build/cJSON-1.7.17/tests/minify_tests.c: scope_hint: In function ‘cjson_minify_should_remove_multiline_comments’
cjson-1.7.17-build/cJSON-1.7.17/tests/minify_tests.c:78:5: warning[-Wanalyzer-null-argument]: use of NULL ‘minified’ where non-null expected
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity_internals.h:654:98: note: in expansion of macro ‘UNITY_TEST_ASSERT’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity.h:125:100: note: in expansion of macro ‘UNITY_TEST_ASSERT_NOT_NULL’
cjson-1.7.17-build/cJSON-1.7.17/tests/minify_tests.c:77:5: note: in expansion of macro ‘TEST_ASSERT_NOT_NULL’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity_internals.h:654:98: note: in expansion of macro ‘UNITY_TEST_ASSERT’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity.h:125:100: note: in expansion of macro ‘UNITY_TEST_ASSERT_NOT_NULL’
cjson-1.7.17-build/cJSON-1.7.17/tests/minify_tests.c:77:5: note: in expansion of macro ‘TEST_ASSERT_NOT_NULL’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity_internals.h:652:122: note: in expansion of macro ‘UNITY_TEST_FAIL’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity_internals.h:654:98: note: in expansion of macro ‘UNITY_TEST_ASSERT’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity.h:125:100: note: in expansion of macro ‘UNITY_TEST_ASSERT_NOT_NULL’
cjson-1.7.17-build/cJSON-1.7.17/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): [#def30]
cjson-1.7.17-build/cJSON-1.7.17/tests/minify_tests.c: scope_hint: In function ‘cjson_minify_should_not_modify_strings’
cjson-1.7.17-build/cJSON-1.7.17/tests/minify_tests.c:92:5: warning[-Wanalyzer-null-argument]: use of NULL ‘minified’ where non-null expected
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity_internals.h:654:98: note: in expansion of macro ‘UNITY_TEST_ASSERT’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity.h:125:100: note: in expansion of macro ‘UNITY_TEST_ASSERT_NOT_NULL’
cjson-1.7.17-build/cJSON-1.7.17/tests/minify_tests.c:91:5: note: in expansion of macro ‘TEST_ASSERT_NOT_NULL’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity_internals.h:654:98: note: in expansion of macro ‘UNITY_TEST_ASSERT’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity.h:125:100: note: in expansion of macro ‘UNITY_TEST_ASSERT_NOT_NULL’
cjson-1.7.17-build/cJSON-1.7.17/tests/minify_tests.c:91:5: note: in expansion of macro ‘TEST_ASSERT_NOT_NULL’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity_internals.h:652:122: note: in expansion of macro ‘UNITY_TEST_FAIL’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity_internals.h:654:98: note: in expansion of macro ‘UNITY_TEST_ASSERT’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity.h:125:100: note: in expansion of macro ‘UNITY_TEST_ASSERT_NOT_NULL’
cjson-1.7.17-build/cJSON-1.7.17/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): [#def31]
cjson-1.7.17-build/cJSON-1.7.17/tests/minify_tests.c: scope_hint: In function ‘cjson_minify_should_minify_json’
cjson-1.7.17-build/cJSON-1.7.17/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: CPPCHECK_WARNING: [#def32]
cjson-1.7.17-build/cJSON-1.7.17/tests/misc_tests.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-476): [#def33]
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity.h:16: included_from: Included from here.
cjson-1.7.17-build/cJSON-1.7.17/tests/misc_tests.c:28: included_from: Included from here.
cjson-1.7.17-build/cJSON-1.7.17/tests/misc_tests.c: scope_hint: In function ‘cjson_set_valuestring_to_object_should_not_leak_memory’
cjson-1.7.17-build/cJSON-1.7.17/tests/misc_tests.c:660:81: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity_internals.h:730:160: note: in definition of macro ‘UNITY_TEST_ASSERT_EQUAL_STRING’
cjson-1.7.17-build/cJSON-1.7.17/tests/misc_tests.c:660:5: note: in expansion of macro ‘TEST_ASSERT_EQUAL_STRING’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c: scope_hint: In function ‘cjson_set_valuestring_to_object_should_not_leak_memory’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c:1076:9: note: in expansion of macro ‘can_access_at_index’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c:1076:9: note: in expansion of macro ‘can_access_at_index’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c:300:49: note: in expansion of macro ‘can_access_at_index’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c:1050:9: note: in expansion of macro ‘cannot_access_at_index’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c:1050:9: note: in expansion of macro ‘cannot_access_at_index’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c:1055:12: note: in expansion of macro ‘can_access_at_index’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c:1326:9: note: in expansion of macro ‘can_read’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c:1326:9: note: in expansion of macro ‘can_read’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c:1333:9: note: in expansion of macro ‘can_read’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c:1333:9: note: in expansion of macro ‘can_read’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c:1340:9: note: in expansion of macro ‘can_read’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c:1340:9: note: in expansion of macro ‘can_read’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c:1348:9: note: in expansion of macro ‘can_access_at_index’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c:1348:9: note: in expansion of macro ‘can_access_at_index’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c:1353:9: note: in expansion of macro ‘can_access_at_index’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c:1353:9: note: in expansion of macro ‘can_access_at_index’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c:1358:9: note: in expansion of macro ‘can_access_at_index’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c:1358:9: note: in expansion of macro ‘can_access_at_index’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c:1363:9: note: in expansion of macro ‘can_access_at_index’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c:1363:9: note: in expansion of macro ‘can_access_at_index’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c:1617:9: note: in expansion of macro ‘cannot_access_at_index’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c:300:49: note: in expansion of macro ‘can_access_at_index’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c:1050:9: note: in expansion of macro ‘cannot_access_at_index’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c:1050:9: note: in expansion of macro ‘cannot_access_at_index’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c:1055:12: note: in expansion of macro ‘can_access_at_index’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c:1624:9: note: in expansion of macro ‘can_access_at_index’
cjson-1.7.17-build/cJSON-1.7.17/tests/misc_tests.c: scope_hint: In function ‘cjson_set_valuestring_to_object_should_not_leak_memory’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c: scope_hint: In function ‘cjson_set_valuestring_to_object_should_not_leak_memory’
cjson-1.7.17-build/cJSON-1.7.17/tests/misc_tests.c: scope_hint: In function ‘cjson_set_valuestring_to_object_should_not_leak_memory’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c: scope_hint: In function ‘cjson_set_valuestring_to_object_should_not_leak_memory’
cjson-1.7.17-build/cJSON-1.7.17/tests/misc_tests.c: scope_hint: In function ‘cjson_set_valuestring_to_object_should_not_leak_memory’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c: scope_hint: In function ‘cjson_set_valuestring_to_object_should_not_leak_memory’
cjson-1.7.17-build/cJSON-1.7.17/tests/misc_tests.c: scope_hint: In function ‘cjson_set_valuestring_to_object_should_not_leak_memory’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity_internals.h:654:98: note: in expansion of macro ‘UNITY_TEST_ASSERT’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity.h:125:100: note: in expansion of macro ‘UNITY_TEST_ASSERT_NOT_NULL’
cjson-1.7.17-build/cJSON-1.7.17/tests/misc_tests.c:658:5: note: in expansion of macro ‘TEST_ASSERT_NOT_NULL’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity_internals.h:652:122: note: in expansion of macro ‘UNITY_TEST_FAIL’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity_internals.h:654:98: note: in expansion of macro ‘UNITY_TEST_ASSERT’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity.h:125:100: note: in expansion of macro ‘UNITY_TEST_ASSERT_NOT_NULL’
cjson-1.7.17-build/cJSON-1.7.17/tests/misc_tests.c:658:5: note: in expansion of macro ‘TEST_ASSERT_NOT_NULL’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity_internals.h:730:160: note: in definition of macro ‘UNITY_TEST_ASSERT_EQUAL_STRING’
cjson-1.7.17-build/cJSON-1.7.17/tests/misc_tests.c:660:5: note: in expansion of macro ‘TEST_ASSERT_EQUAL_STRING’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c: scope_hint: In function ‘cjson_set_valuestring_to_object_should_not_leak_memory’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity_internals.h:730:160: note: in definition of macro ‘UNITY_TEST_ASSERT_EQUAL_STRING’
cjson-1.7.17-build/cJSON-1.7.17/tests/misc_tests.c:660:5: note: in expansion of macro ‘TEST_ASSERT_EQUAL_STRING’
cjson-1.7.17-build/cJSON-1.7.17/tests/misc_tests.c: scope_hint: In function ‘cjson_set_valuestring_to_object_should_not_leak_memory’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity_internals.h:730:160: note: in definition of macro ‘UNITY_TEST_ASSERT_EQUAL_STRING’
cjson-1.7.17-build/cJSON-1.7.17/tests/misc_tests.c:660:5: note: in expansion of macro ‘TEST_ASSERT_EQUAL_STRING’
#  658|       TEST_ASSERT_NOT_NULL(return_value);
#  659|       TEST_ASSERT_EQUAL_PTR_MESSAGE(ptr1, return_value, "new valuestring shorter than old should not reallocate memory");
#  660|->     TEST_ASSERT_EQUAL_STRING(short_valuestring, cJSON_GetObjectItem(root, "one")->valuestring);
#  661|   
#  662|       /* we needn't to free the original valuestring manually */

Error: GCC_ANALYZER_WARNING (CWE-476): [#def34]
cjson-1.7.17-build/cJSON-1.7.17/tests/misc_tests.c:667:80: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity_internals.h:730:160: note: in definition of macro ‘UNITY_TEST_ASSERT_EQUAL_STRING’
cjson-1.7.17-build/cJSON-1.7.17/tests/misc_tests.c:667:5: note: in expansion of macro ‘TEST_ASSERT_EQUAL_STRING’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c: scope_hint: In function ‘cjson_set_valuestring_to_object_should_not_leak_memory’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c:1076:9: note: in expansion of macro ‘can_access_at_index’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c:1076:9: note: in expansion of macro ‘can_access_at_index’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c:300:49: note: in expansion of macro ‘can_access_at_index’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c:1050:9: note: in expansion of macro ‘cannot_access_at_index’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c:1050:9: note: in expansion of macro ‘cannot_access_at_index’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c:1055:12: note: in expansion of macro ‘can_access_at_index’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c:1326:9: note: in expansion of macro ‘can_read’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c:1326:9: note: in expansion of macro ‘can_read’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c:1333:9: note: in expansion of macro ‘can_read’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c:1333:9: note: in expansion of macro ‘can_read’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c:1340:9: note: in expansion of macro ‘can_read’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c:1340:9: note: in expansion of macro ‘can_read’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c:1348:9: note: in expansion of macro ‘can_access_at_index’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c:1348:9: note: in expansion of macro ‘can_access_at_index’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c:1353:9: note: in expansion of macro ‘can_access_at_index’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c:1353:9: note: in expansion of macro ‘can_access_at_index’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c:1358:9: note: in expansion of macro ‘can_access_at_index’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c:1358:9: note: in expansion of macro ‘can_access_at_index’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c:1363:9: note: in expansion of macro ‘can_access_at_index’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c:1363:9: note: in expansion of macro ‘can_access_at_index’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c:1617:9: note: in expansion of macro ‘cannot_access_at_index’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c:300:49: note: in expansion of macro ‘can_access_at_index’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c:1050:9: note: in expansion of macro ‘cannot_access_at_index’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c:1050:9: note: in expansion of macro ‘cannot_access_at_index’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c:1055:12: note: in expansion of macro ‘can_access_at_index’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c:1624:9: note: in expansion of macro ‘can_access_at_index’
cjson-1.7.17-build/cJSON-1.7.17/tests/misc_tests.c: scope_hint: In function ‘cjson_set_valuestring_to_object_should_not_leak_memory’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c: scope_hint: In function ‘cjson_set_valuestring_to_object_should_not_leak_memory’
cjson-1.7.17-build/cJSON-1.7.17/tests/misc_tests.c: scope_hint: In function ‘cjson_set_valuestring_to_object_should_not_leak_memory’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c: scope_hint: In function ‘cjson_set_valuestring_to_object_should_not_leak_memory’
cjson-1.7.17-build/cJSON-1.7.17/tests/misc_tests.c: scope_hint: In function ‘cjson_set_valuestring_to_object_should_not_leak_memory’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c: scope_hint: In function ‘cjson_set_valuestring_to_object_should_not_leak_memory’
cjson-1.7.17-build/cJSON-1.7.17/tests/misc_tests.c: scope_hint: In function ‘cjson_set_valuestring_to_object_should_not_leak_memory’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity_internals.h:654:98: note: in expansion of macro ‘UNITY_TEST_ASSERT’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity.h:125:100: note: in expansion of macro ‘UNITY_TEST_ASSERT_NOT_NULL’
cjson-1.7.17-build/cJSON-1.7.17/tests/misc_tests.c:658:5: note: in expansion of macro ‘TEST_ASSERT_NOT_NULL’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity_internals.h:652:122: note: in expansion of macro ‘UNITY_TEST_FAIL’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity_internals.h:654:98: note: in expansion of macro ‘UNITY_TEST_ASSERT’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity.h:125:100: note: in expansion of macro ‘UNITY_TEST_ASSERT_NOT_NULL’
cjson-1.7.17-build/cJSON-1.7.17/tests/misc_tests.c:658:5: note: in expansion of macro ‘TEST_ASSERT_NOT_NULL’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity_internals.h:730:160: note: in definition of macro ‘UNITY_TEST_ASSERT_EQUAL_STRING’
cjson-1.7.17-build/cJSON-1.7.17/tests/misc_tests.c:660:5: note: in expansion of macro ‘TEST_ASSERT_EQUAL_STRING’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c: scope_hint: In function ‘cjson_set_valuestring_to_object_should_not_leak_memory’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity_internals.h:730:160: note: in definition of macro ‘UNITY_TEST_ASSERT_EQUAL_STRING’
cjson-1.7.17-build/cJSON-1.7.17/tests/misc_tests.c:660:5: note: in expansion of macro ‘TEST_ASSERT_EQUAL_STRING’
cjson-1.7.17-build/cJSON-1.7.17/tests/misc_tests.c: scope_hint: In function ‘cjson_set_valuestring_to_object_should_not_leak_memory’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c: scope_hint: In function ‘cjson_set_valuestring_to_object_should_not_leak_memory’
cjson-1.7.17-build/cJSON-1.7.17/tests/misc_tests.c: scope_hint: In function ‘cjson_set_valuestring_to_object_should_not_leak_memory’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity_internals.h:654:98: note: in expansion of macro ‘UNITY_TEST_ASSERT’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity.h:125:100: note: in expansion of macro ‘UNITY_TEST_ASSERT_NOT_NULL’
cjson-1.7.17-build/cJSON-1.7.17/tests/misc_tests.c:665:5: note: in expansion of macro ‘TEST_ASSERT_NOT_NULL’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity_internals.h:652:122: note: in expansion of macro ‘UNITY_TEST_FAIL’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity_internals.h:654:98: note: in expansion of macro ‘UNITY_TEST_ASSERT’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity.h:125:100: note: in expansion of macro ‘UNITY_TEST_ASSERT_NOT_NULL’
cjson-1.7.17-build/cJSON-1.7.17/tests/misc_tests.c:665:5: note: in expansion of macro ‘TEST_ASSERT_NOT_NULL’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity_internals.h:730:160: note: in definition of macro ‘UNITY_TEST_ASSERT_EQUAL_STRING’
cjson-1.7.17-build/cJSON-1.7.17/tests/misc_tests.c:667:5: note: in expansion of macro ‘TEST_ASSERT_EQUAL_STRING’
cjson-1.7.17-build/cJSON-1.7.17/cJSON.c: scope_hint: In function ‘cjson_set_valuestring_to_object_should_not_leak_memory’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity_internals.h:730:160: note: in definition of macro ‘UNITY_TEST_ASSERT_EQUAL_STRING’
cjson-1.7.17-build/cJSON-1.7.17/tests/misc_tests.c:667:5: note: in expansion of macro ‘TEST_ASSERT_EQUAL_STRING’
cjson-1.7.17-build/cJSON-1.7.17/tests/misc_tests.c: scope_hint: In function ‘cjson_set_valuestring_to_object_should_not_leak_memory’
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity_internals.h:730:160: note: in definition of macro ‘UNITY_TEST_ASSERT_EQUAL_STRING’
cjson-1.7.17-build/cJSON-1.7.17/tests/misc_tests.c:667:5: note: in expansion of macro ‘TEST_ASSERT_EQUAL_STRING’
#  665|       TEST_ASSERT_NOT_NULL(return_value);
#  666|       TEST_ASSERT_NOT_EQUAL_MESSAGE(ptr1, return_value, "new valuestring longer than old should reallocate memory")
#  667|->     TEST_ASSERT_EQUAL_STRING(long_valuestring, cJSON_GetObjectItem(root, "one")->valuestring);
#  668|   
#  669|       return_value = cJSON_SetValuestring(cJSON_GetObjectItem(root, "two"), long_valuestring);

Error: CPPCHECK_WARNING: [#def35]
cjson-1.7.17-build/cJSON-1.7.17/tests/parse_array.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def36]
cjson-1.7.17-build/cJSON-1.7.17/tests/parse_examples.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def37]
cjson-1.7.17-build/cJSON-1.7.17/tests/parse_examples.c:251:1: warning[core.StackAddressEscape]: Address of stack memory associated with local variable 'test_14' is still referred to by the global variable 'global_error' upon returning to the caller.  This will be a dangling reference
#  249|           cJSON_Delete(tree);
#  250|       }
#  251|-> }
#  252|   
#  253|   int CJSON_CDECL main(void)

Error: CPPCHECK_WARNING: [#def38]
cjson-1.7.17-build/cJSON-1.7.17/tests/parse_hex4.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def39]
cjson-1.7.17-build/cJSON-1.7.17/tests/parse_number.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def40]
cjson-1.7.17-build/cJSON-1.7.17/tests/parse_object.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def41]
cjson-1.7.17-build/cJSON-1.7.17/tests/parse_object.c:48:5: warning[core.NullDereference]: Access to field 'string' results in a dereference of a null pointer (loaded from variable 'child_item')
#   46|   {
#   47|       TEST_ASSERT_NOT_NULL_MESSAGE(child_item, "Child item is NULL.");
#   48|->     TEST_ASSERT_NOT_NULL_MESSAGE(child_item->string, "Child item doesn't have a name.");
#   49|       TEST_ASSERT_EQUAL_STRING_MESSAGE(name, child_item->string, "Child item has the wrong name.");
#   50|       TEST_ASSERT_BITS(0xFF, type, child_item->type);

Error: CPPCHECK_WARNING: [#def42]
cjson-1.7.17-build/cJSON-1.7.17/tests/parse_string.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def43]
cjson-1.7.17-build/cJSON-1.7.17/tests/parse_value.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def44]
cjson-1.7.17-build/cJSON-1.7.17/tests/parse_with_opts.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def45]
cjson-1.7.17-build/cJSON-1.7.17/tests/print_array.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def46]
cjson-1.7.17-build/cJSON-1.7.17/tests/print_number.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def47]
cjson-1.7.17-build/cJSON-1.7.17/tests/print_object.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def48]
cjson-1.7.17-build/cJSON-1.7.17/tests/print_string.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def49]
cjson-1.7.17-build/cJSON-1.7.17/tests/print_value.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def50]
cjson-1.7.17-build/cJSON-1.7.17/tests/readme_examples.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def51]
cjson-1.7.17-build/cJSON-1.7.17/tests/unity/src/unity.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Scan Properties

analyzer-version-clang18.1.7
analyzer-version-cppcheck2.14.2
analyzer-version-gcc14.1.1
analyzer-version-gcc-analyzer14.1.1
analyzer-version-shellcheck0.10.0
enabled-pluginsclang, cppcheck, gcc, shellcheck
exit-code0
hostip-172-16-1-175.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-namecjson-1.7.17-1.fc41
store-results-to/tmp/tmpjq51a04b/cjson-1.7.17-1.fc41.tar.xz
time-created2024-07-03 12:08:10
time-finished2024-07-03 12:09:41
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpjq51a04b/cjson-1.7.17-1.fc41.tar.xz' '--gcc-analyze' '/tmp/tmpjq51a04b/cjson-1.7.17-1.fc41.src.rpm'
tool-versioncsmock-3.5.3-1.el9