Task #131183 - fixed.err
back to task #131183download
Error: GCC_ANALYZER_WARNING (CWE-476):
jq-1.8.1/src/jv_aux.c:751:9: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
jq-1.8.1/src/jv_aux.c:742:4: enter_function: entry to 'jv_unique'
jq-1.8.1/src/jv_aux.c:743:3: branch_true: following 'true' branch...
jq-1.8.1/src/jv_aux.c:744:3: branch_true: ...to here
jq-1.8.1/src/jv_aux.c:744:3: branch_true: following 'true' branch...
jq-1.8.1/src/jv_aux.c:745:3: branch_true: ...to here
jq-1.8.1/src/jv_aux.c:745:3: branch_true: following 'true' branch...
jq-1.8.1/src/jv_aux.c:746:11: branch_true: ...to here
jq-1.8.1/src/jv_aux.c:747:32: call_function: calling 'sort_items' from 'jv_unique'
jq-1.8.1/src/jv_aux.c:747:32: return_function: returning to 'jv_unique' from 'sort_items'
jq-1.8.1/src/jv_aux.c:750:19: branch_true: following 'true' branch...
jq-1.8.1/src/jv_aux.c:751:52: branch_true: ...to here
jq-1.8.1/src/jv_aux.c:751:9: danger: dereference of NULL 'sort_items(objects, keys) + (long unsigned int)i * 40'
# 749| jv curr_key = jv_invalid();
# 750| for (int i = 0; i < n; i++) {
# 751|-> if (jv_equal(jv_copy(curr_key), jv_copy(entries[i].key))) {
# 752| jv_free(entries[i].key);
# 753| jv_free(entries[i].object);