Task #449 - added.err

back to task #449
download
Error: GCC_ANALYZER_WARNING (CWE-688):
git-2.45.2-build/git-2.45.2/builtin/interpret-trailers.c: scope_hint: In function ‘create_in_place_tempfile’
git-2.45.2-build/git-2.45.2/builtin/interpret-trailers.c:104:13: warning[-Wanalyzer-null-argument]: use of NULL ‘file’ where non-null expected
/usr/include/features.h:511: included_from: Included from here.
/usr/include/unistd.h:25: included_from: Included from here.
git-2.45.2-build/git-2.45.2/git-compat-util.h:233: included_from: Included from here.
git-2.45.2-build/git-2.45.2/builtin.h:4: included_from: Included from here.
git-2.45.2-build/git-2.45.2/builtin/interpret-trailers.c:8: included_from: Included from here.
/usr/include/sys/stat.h:227:12: note: argument 1 of ‘stat’ must be non-null
#  102|   	FILE *outfile;
#  103|   
#  104|-> 	if (stat(file, &st))
#  105|   		die_errno(_("could not stat %s"), file);
#  106|   	if (!S_ISREG(st.st_mode))

Error: GCC_ANALYZER_WARNING (CWE-476):
git-2.45.2-build/git-2.45.2/hash-ll.h:273:24: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
git-2.45.2-build/git-2.45.2/commit.c: scope_hint: In function ‘commit_tree_extended’
#  271|   {
#  272|   	memcpy(dst->hash, src->hash, GIT_MAX_RAWSZ);
#  273|-> 	dst->algo = src->algo;
#  274|   }
#  275|   

Error: GCC_ANALYZER_WARNING (CWE-1341):
git-2.45.2-build/git-2.45.2/loose.c: scope_hint: In function ‘write_one_object’
git-2.45.2-build/git-2.45.2/loose.c:199:9: warning[-Wanalyzer-fd-double-close]: double ‘close’ of file descriptor ‘open(path.buf, 1089, 438)’
git-2.45.2-build/git-2.45.2/loose.c:1: included_from: Included from here.
git-2.45.2-build/git-2.45.2/loose.c:198:9: note: in expansion of macro ‘error_errno’
git-2.45.2-build/git-2.45.2/loose.c:7: included_from: Included from here.
git-2.45.2-build/git-2.45.2/loose.c:198:9: note: in expansion of macro ‘error_errno’
#  197|   errout:
#  198|   	error_errno(_("failed to write loose object index %s\n"), path.buf);
#  199|-> 	close(fd);
#  200|   	rollback_lock_file(&lock);
#  201|   	strbuf_release(&buf);

Error: GCC_ANALYZER_WARNING (CWE-476):
git-2.45.2-build/git-2.45.2/refs/reftable-backend.c:1: included_from: Included from here.
git-2.45.2-build/git-2.45.2/refs/reftable-backend.c: scope_hint: In function ‘queue_transaction_update’
git-2.45.2-build/git-2.45.2/refs/reftable-backend.c:704:37: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘arg’
git-2.45.2-build/git-2.45.2/git-compat-util.h:1214:22: note: in definition of macro ‘ALLOC_GROW’
git-2.45.2-build/git-2.45.2/git-compat-util.h:1214:22: note: in definition of macro ‘ALLOC_GROW’
git-2.45.2-build/git-2.45.2/git-compat-util.h:1214:22: note: in definition of macro ‘ALLOC_GROW’
git-2.45.2-build/git-2.45.2/git-compat-util.h:1214:22: note: in definition of macro ‘ALLOC_GROW’
#  702|   		return ret;
#  703|   
#  704|-> 	ALLOC_GROW(arg->updates, arg->updates_nr + 1,
#  705|   		   arg->updates_alloc);
#  706|   	arg->updates[arg->updates_nr].update = update;

Error: CLANG_WARNING:
git-2.45.2-build/git-2.45.2/refs/reftable-backend.c:1469:4: warning[deadcode.DeadStores]: Value stored to 'ret' is never read
# 1467|   			goto done;
# 1468|   		if (ret > 0 || strcmp(old_log.refname, arg->oldname)) {
# 1469|-> 			ret = 0;
# 1470|   			break;
# 1471|   		}

Error: CLANG_WARNING:
git-2.45.2-build/git-2.45.2/reftable/reader.c:267:29: warning[core.NullDereference]: Access to field 'block_size' results in a dereference of a null pointer (loaded from variable 'r')
#  265|   			     uint64_t next_off, uint8_t want_typ)
#  266|   {
#  267|-> 	int32_t guess_block_size = r->block_size ? r->block_size :
#  268|   							 DEFAULT_BLOCK_SIZE;
#  269|   	struct reftable_block block = { NULL };

Error: CLANG_WARNING:
git-2.45.2-build/git-2.45.2/trailer.c:328:8: warning[unix.Malloc]: Use of memory after it is freed
#  326|   	list_for_each_dir(pos, head, backwards) {
#  327|   		in_tok = list_entry(pos, struct trailer_item, list);
#  328|-> 		if (!same_token(in_tok, arg_tok))
#  329|   			continue;
#  330|   		on_tok = middle ? in_tok : start_tok;