Task #131183 - added.err
back to task #131183download
Error: GCC_ANALYZER_WARNING (CWE-476):
jq-1.8.2/src/jv.c:2042:15: warning[-Wanalyzer-null-dereference]: dereference of NULL 'pending'
jq-1.8.2/src/jv.c:2183:5: enter_function: entry to 'jv_contains'
jq-1.8.2/src/jv.c:2184:10: call_function: calling 'jvp_contains' from 'jv_contains'
# 2040| if (jv_get_kind(slot->string) != JV_KIND_NULL) {
# 2041| jvp_string_free(slot->string);
# 2042|-> pending[len++] = slot->value;
# 2043| }
# 2044| }
Error: GCC_ANALYZER_WARNING (CWE-476):
jq-1.8.2/src/jv_aux.c:830:17: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
jq-1.8.2/src/jv_aux.c:818:4: enter_function: entry to 'jv_unique'
jq-1.8.2/src/jv_aux.c:819:3: branch_true: following 'true' branch...
jq-1.8.2/src/jv_aux.c:820:3: branch_true: ...to here
jq-1.8.2/src/jv_aux.c:820:3: branch_true: following 'true' branch...
jq-1.8.2/src/jv_aux.c:821:3: branch_true: ...to here
jq-1.8.2/src/jv_aux.c:821:3: branch_true: following 'true' branch...
jq-1.8.2/src/jv_aux.c:822:11: branch_true: ...to here
jq-1.8.2/src/jv_aux.c:824:32: call_function: calling 'sort_items' from 'jv_unique'
jq-1.8.2/src/jv_aux.c:824:32: return_function: returning to 'jv_unique' from 'sort_items'
jq-1.8.2/src/jv_aux.c:825:6: branch_false: following 'false' branch...
jq-1.8.2/src/jv_aux.c:827:12: branch_false: ...to here
jq-1.8.2/src/jv_aux.c:829:19: branch_true: following 'true' branch...
jq-1.8.2/src/jv_aux.c:830:60: branch_true: ...to here
jq-1.8.2/src/jv_aux.c:830:17: danger: dereference of NULL 'sort_items(objects, keys, & too_deep) + (long unsigned int)i * 40'
# 828| jv curr_key = jv_invalid();
# 829| for (int i = 0; i < n; i++) {
# 830|-> int equal = jv_equal(jv_copy(curr_key), jv_copy(entries[i].key));
# 831| if (equal < 0) {
# 832| jv_free(curr_key);
Error: GCC_ANALYZER_WARNING (CWE-401):
jq-1.8.2/src/linker.c:374:5: warning[-Wanalyzer-malloc-leak]: leak of 'strdup(jv_string_value(lib_path))'
jq-1.8.2/src/linker.c:359:6: branch_false: following 'false' branch...
jq-1.8.2/src/linker.c:369:13: branch_false: ...to here
jq-1.8.2/src/linker.c:369:13: branch_true: following 'true' branch (when 'is_data != 0')...
jq-1.8.2/src/linker.c:371:15: branch_true: ...to here
jq-1.8.2/src/linker.c:374:42: acquire_memory: allocated here
jq-1.8.2/src/linker.c:374:5: danger: 'strdup(jv_string_value(lib_path))' leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
# 372| state_idx = lib_state->ct++;
# 373| lib_state->entries = jv_mem_realloc(lib_state->entries, lib_state->ct * sizeof(struct lib_entry));
# 374|-> lib_state->entries[state_idx].name = strdup(jv_string_value(lib_path));
# 375| lib_state->entries[state_idx].def = program;
# 376| lib_state->entries[state_idx].loading = 0;
Error: GCC_ANALYZER_WARNING (CWE-401):
jq-1.8.2/src/linker.c:387:7: warning[-Wanalyzer-malloc-leak]: leak of 'strdup(jv_string_value(lib_path))'
jq-1.8.2/src/linker.c:359:6: branch_false: following 'false' branch...
jq-1.8.2/src/linker.c:369:13: branch_false: ...to here
jq-1.8.2/src/linker.c:369:13: branch_false: following 'false' branch (when 'is_data == 0')...
jq-1.8.2/src/linker.c:379:11: branch_false: ...to here
jq-1.8.2/src/linker.c:382:8: branch_true: following 'true' branch...
jq-1.8.2/src/linker.c:385:19: branch_true: ...to here
jq-1.8.2/src/linker.c:387:44: acquire_memory: allocated here
jq-1.8.2/src/linker.c:387:7: danger: 'strdup(jv_string_value(lib_path))' leaks here; was allocated at [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
# 385| state_idx = lib_state->ct++;
# 386| lib_state->entries = jv_mem_realloc(lib_state->entries, lib_state->ct * sizeof(struct lib_entry));
# 387|-> lib_state->entries[state_idx].name = strdup(jv_string_value(lib_path));
# 388| lib_state->entries[state_idx].def = gen_noop();
# 389| lib_state->entries[state_idx].loading = 1;