Task #314 - fixed.err
back to task #314download
Error: GCC_ANALYZER_WARNING (CWE-476): cjson-1.7.15-build/cJSON-1.7.15/tests/common.h:26: included_from: Included from here. cjson-1.7.15-build/cJSON-1.7.15/tests/misc_tests.c:29: included_from: Included from here. cjson-1.7.15-build/cJSON-1.7.15/cJSON.c: scope_hint: In function ‘cJSON_SetValuestring’ cjson-1.7.15-build/cJSON-1.7.15/cJSON.c:408:45: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘object’ cjson-1.7.15-build/cJSON-1.7.15/cJSON.c: scope_hint: In function ‘cJSON_SetValuestring’ cjson-1.7.15-build/cJSON-1.7.15/cJSON.c:1067:9: note: in expansion of macro ‘can_access_at_index’ cjson-1.7.15-build/cJSON-1.7.15/cJSON.c:1067:9: note: in expansion of macro ‘can_access_at_index’ cjson-1.7.15-build/cJSON-1.7.15/cJSON.c:300:49: note: in expansion of macro ‘can_access_at_index’ cjson-1.7.15-build/cJSON-1.7.15/cJSON.c:1041:9: note: in expansion of macro ‘cannot_access_at_index’ cjson-1.7.15-build/cJSON-1.7.15/cJSON.c:1041:9: note: in expansion of macro ‘cannot_access_at_index’ cjson-1.7.15-build/cJSON-1.7.15/cJSON.c:1046:12: note: in expansion of macro ‘can_access_at_index’ cjson-1.7.15-build/cJSON-1.7.15/cJSON.c:1317:9: note: in expansion of macro ‘can_read’ cjson-1.7.15-build/cJSON-1.7.15/cJSON.c:1317:9: note: in expansion of macro ‘can_read’ cjson-1.7.15-build/cJSON-1.7.15/cJSON.c:1324:9: note: in expansion of macro ‘can_read’ cjson-1.7.15-build/cJSON-1.7.15/cJSON.c:1324:9: note: in expansion of macro ‘can_read’ cjson-1.7.15-build/cJSON-1.7.15/cJSON.c:1331:9: note: in expansion of macro ‘can_read’ cjson-1.7.15-build/cJSON-1.7.15/cJSON.c:1331:9: note: in expansion of macro ‘can_read’ cjson-1.7.15-build/cJSON-1.7.15/cJSON.c:1339:9: note: in expansion of macro ‘can_access_at_index’ cjson-1.7.15-build/cJSON-1.7.15/cJSON.c:1339:9: note: in expansion of macro ‘can_access_at_index’ cjson-1.7.15-build/cJSON-1.7.15/cJSON.c:1344:9: note: in expansion of macro ‘can_access_at_index’ cjson-1.7.15-build/cJSON-1.7.15/cJSON.c:1344:9: note: in expansion of macro ‘can_access_at_index’ cjson-1.7.15-build/cJSON-1.7.15/cJSON.c:1349:9: note: in expansion of macro ‘can_access_at_index’ cjson-1.7.15-build/cJSON-1.7.15/cJSON.c:1349:9: note: in expansion of macro ‘can_access_at_index’ cjson-1.7.15-build/cJSON-1.7.15/cJSON.c:1354:9: note: in expansion of macro ‘can_access_at_index’ cjson-1.7.15-build/cJSON-1.7.15/cJSON.c:1354:9: note: in expansion of macro ‘can_access_at_index’ cjson-1.7.15-build/cJSON-1.7.15/cJSON.c:1608:9: note: in expansion of macro ‘cannot_access_at_index’ cjson-1.7.15-build/cJSON-1.7.15/cJSON.c:300:49: note: in expansion of macro ‘can_access_at_index’ cjson-1.7.15-build/cJSON-1.7.15/cJSON.c:1041:9: note: in expansion of macro ‘cannot_access_at_index’ cjson-1.7.15-build/cJSON-1.7.15/cJSON.c:1041:9: note: in expansion of macro ‘cannot_access_at_index’ cjson-1.7.15-build/cJSON-1.7.15/cJSON.c:1046:12: note: in expansion of macro ‘can_access_at_index’ cjson-1.7.15-build/cJSON-1.7.15/cJSON.c:1615:9: note: in expansion of macro ‘can_access_at_index’ cjson-1.7.15-build/cJSON-1.7.15/tests/misc_tests.c: scope_hint: In function ‘cJSON_SetValuestring’ cjson-1.7.15-build/cJSON-1.7.15/cJSON.c: scope_hint: In function ‘cJSON_SetValuestring’ cjson-1.7.15-build/cJSON-1.7.15/tests/misc_tests.c: scope_hint: In function ‘cJSON_SetValuestring’ cjson-1.7.15-build/cJSON-1.7.15/cJSON.c: scope_hint: In function ‘cJSON_SetValuestring’ cjson-1.7.15-build/cJSON-1.7.15/tests/misc_tests.c: scope_hint: In function ‘cJSON_SetValuestring’ cjson-1.7.15-build/cJSON-1.7.15/cJSON.c: scope_hint: In function ‘cJSON_SetValuestring’ cjson-1.7.15-build/cJSON-1.7.15/tests/misc_tests.c: scope_hint: In function ‘cJSON_SetValuestring’ # 406| return NULL; # 407| } # 408|-> if (strlen(valuestring) <= strlen(object->valuestring)) # 409| { # 410| strcpy(object->valuestring, valuestring); Error: CPPCHECK_WARNING (CWE-476): cjson-1.7.15-build/cJSON-1.7.15/cJSON.c:2274: warning[nullPointer]: Possible null pointer dereference: newitem # 2272| } # 2273| # 2274|-> newitem->next = after_inserted; # 2275| newitem->prev = after_inserted->prev; # 2276| after_inserted->prev = newitem; Error: CLANG_WARNING: cjson-1.7.15-build/cJSON-1.7.15/tests/misc_tests.c:29: included_from: Included from here. cjson-1.7.15-build/cJSON-1.7.15/tests/common.h:26: included_from: Included from here. cjson-1.7.15-build/cJSON-1.7.15/cJSON.c:2274:19: warning[core.NullDereference]: Access to field 'next' results in a dereference of a null pointer (loaded from variable 'newitem') # 2272| } # 2273| # 2274|-> newitem->next = after_inserted; # 2275| newitem->prev = after_inserted->prev; # 2276| after_inserted->prev = newitem; Error: CPPCHECK_WARNING (CWE-476): cjson-1.7.15-build/cJSON-1.7.15/cJSON.c:2275: warning[nullPointer]: Possible null pointer dereference: newitem # 2273| # 2274| newitem->next = after_inserted; # 2275|-> newitem->prev = after_inserted->prev; # 2276| after_inserted->prev = newitem; # 2277| if (after_inserted == array->child) Error: CPPCHECK_WARNING (CWE-476): cjson-1.7.15-build/cJSON-1.7.15/cJSON.c:2277: warning[nullPointer]: Possible null pointer dereference: array # 2275| newitem->prev = after_inserted->prev; # 2276| after_inserted->prev = newitem; # 2277|-> if (after_inserted == array->child) # 2278| { # 2279| array->child = newitem;