xz-5.6.2-1.fc41

List of Defects

Error: CPPCHECK_WARNING: [#def1]
xz-5.6.2-build/xz-5.6.2/src/common/tuklib_mbstr_width.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-775): [#def2]
xz-5.6.2-build/xz-5.6.2/src/common/tuklib_open_stdxxx.c: scope_hint: In function ‘tuklib_open_stdxxx’
xz-5.6.2-build/xz-5.6.2/src/common/tuklib_open_stdxxx.c:40:28: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", <unknown>)’
#   38|   					| (i == 0 ? O_WRONLY : O_RDONLY));
#   39|   
#   40|-> 			if (fd != i) {
#   41|   				if (fd != -1)
#   42|   					(void)close(fd);

Error: CPPCHECK_WARNING: [#def3]
xz-5.6.2-build/xz-5.6.2/src/liblzma/common/alone_encoder.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def4]
xz-5.6.2-build/xz-5.6.2/src/liblzma/common/block_buffer_encoder.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def5]
xz-5.6.2-build/xz-5.6.2/src/liblzma/common/block_encoder.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def6]
xz-5.6.2-build/xz-5.6.2/src/liblzma/common/block_header_decoder.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def7]
xz-5.6.2-build/xz-5.6.2/src/liblzma/common/block_header_encoder.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def8]
xz-5.6.2-build/xz-5.6.2/src/liblzma/common/file_info.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def9]
xz-5.6.2-build/xz-5.6.2/src/liblzma/common/filter_buffer_decoder.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def10]
xz-5.6.2-build/xz-5.6.2/src/liblzma/common/filter_common.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def11]
xz-5.6.2-build/xz-5.6.2/src/liblzma/common/filter_flags_encoder.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def12]
xz-5.6.2-build/xz-5.6.2/src/liblzma/common/index.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def13]
xz-5.6.2-build/xz-5.6.2/src/liblzma/common/index.c:265:11: warning[core.NullDereference]: Access to field 'parent' results in a dereference of a null pointer (loaded from variable 'node')
#  263|   		up = ctz32(tree->count) + 2;
#  264|   		do {
#  265|-> 			node = node->parent;
#  266|   		} while (--up > 0);
#  267|   

Error: CLANG_WARNING: [#def14]
xz-5.6.2-build/xz-5.6.2/src/liblzma/common/index.c:269:28: warning[core.NullDereference]: Access to field 'right' results in a dereference of a null pointer (loaded from variable 'node')
#  267|   
#  268|   		// Rotate left using node as the rotation root.
#  269|-> 		index_tree_node *pivot = node->right;
#  270|   
#  271|   		if (node->parent == NULL) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def15]
xz-5.6.2-build/xz-5.6.2/src/liblzma/common/index.c:318:32: warning[-Wanalyzer-null-dereference]: dereference of NULL 'result'
xz-5.6.2-build/xz-5.6.2/src/liblzma/common/index.c: scope_hint: In function 'lzma_index_iter_locate'
xz-5.6.2-build/xz-5.6.2/src/liblzma/common/index.c: scope_hint: In function 'lzma_index_iter_locate'
#  316|   {
#  317|   	const index_tree_node *result = NULL;
#  318|-> 	const index_tree_node *node = tree->root;
#  319|   
#  320|   	assert(tree->leftmost == NULL

Error: GCC_ANALYZER_WARNING (CWE-476): [#def16]
xz-5.6.2-build/xz-5.6.2/src/liblzma/common/index.c: scope_hint: In function 'lzma_index_iter_locate'
xz-5.6.2-build/xz-5.6.2/src/liblzma/common/index.c:1251:16: warning[-Wanalyzer-null-dereference]: dereference of NULL 'result'
xz-5.6.2-build/xz-5.6.2/src/liblzma/common/index.c: scope_hint: In function 'lzma_index_iter_locate'
# 1249|   	// we don't want to return them.
# 1250|   	size_t left = 0;
# 1251|-> 	size_t right = group->last;
# 1252|   
# 1253|   	while (left < right) {

Error: CPPCHECK_WARNING: [#def17]
xz-5.6.2-build/xz-5.6.2/src/liblzma/common/microlzma_decoder.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def18]
xz-5.6.2-build/xz-5.6.2/src/liblzma/common/stream_buffer_encoder.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING (CWE-457): [#def19]
xz-5.6.2-build/xz-5.6.2/src/liblzma/common/stream_decoder.c:218: error[uninitvar]: Uninitialized variable: filters
#  216|   
#  217|   		// Check the memory usage limit.
#  218|-> 		const uint64_t memusage = lzma_raw_decoder_memusage(filters);
#  219|   		lzma_ret ret;
#  220|   

Error: CPPCHECK_WARNING: [#def20]
xz-5.6.2-build/xz-5.6.2/src/liblzma/common/stream_decoder_mt.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def21]
xz-5.6.2-build/xz-5.6.2/src/liblzma/common/stream_encoder.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def22]
xz-5.6.2-build/xz-5.6.2/src/liblzma/common/stream_encoder_mt.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def23]
xz-5.6.2-build/xz-5.6.2/src/liblzma/common/string_conversion.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def24]
xz-5.6.2-build/xz-5.6.2/src/liblzma/lz/lz_decoder.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def25]
xz-5.6.2-build/xz-5.6.2/src/liblzma/lz/lz_encoder.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def26]
xz-5.6.2-build/xz-5.6.2/src/liblzma/lzma/lzma2_decoder.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def27]
xz-5.6.2-build/xz-5.6.2/src/liblzma/lzma/lzma_decoder.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def28]
xz-5.6.2-build/xz-5.6.2/src/liblzma/lzma/lzma_encoder.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def29]
xz-5.6.2-build/xz-5.6.2/src/liblzma/lzma/lzma_encoder_optimum_fast.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def30]
xz-5.6.2-build/xz-5.6.2/src/liblzma/lzma/lzma_encoder_optimum_normal.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def31]
xz-5.6.2-build/xz-5.6.2/src/liblzma/simple/ia64.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def32]
xz-5.6.2-build/xz-5.6.2/src/liblzma/simple/riscv.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def33]
xz-5.6.2-build/xz-5.6.2/src/liblzma/simple/simple_coder.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def34]
xz-5.6.2-build/xz-5.6.2/src/liblzma/simple/x86.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def35]
xz-5.6.2-build/xz-5.6.2/src/xz/args.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def36]
xz-5.6.2-build/xz-5.6.2/src/xz/coder.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def37]
xz-5.6.2-build/xz-5.6.2/src/xz/coder.c:653:28: warning[core.UndefinedBinaryOperatorResult]: The left operand of '<=' is a garbage value
#  651|   
#  652|   		// Skip chains that already meet the memory usage limit.
#  653|-> 		if (encoder_memusages[i] <=  memory_limit)
#  654|   			continue;
#  655|   

Error: CPPCHECK_WARNING: [#def38]
xz-5.6.2-build/xz-5.6.2/src/xz/file_io.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def39]
xz-5.6.2-build/xz-5.6.2/src/xz/hardware.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def40]
xz-5.6.2-build/xz-5.6.2/src/xz/list.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def41]
xz-5.6.2-build/xz-5.6.2/src/xz/main.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def42]
xz-5.6.2-build/xz-5.6.2/src/xz/message.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def43]
xz-5.6.2-build/xz-5.6.2/src/xz/options.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING (CWE-369): [#def44]
xz-5.6.2-build/xz-5.6.2/src/xz/util.c:155: error[zerodiv]: Division by zero.
#  153|   
#  154|   		// Don't overflow here either.
#  155|-> 		if (result > UINT64_MAX / multiplier)
#  156|   			goto error;
#  157|   

Error: CPPCHECK_WARNING: [#def45]
xz-5.6.2-build/xz-5.6.2/src/xzdec/xzdec.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING (CWE-562): [#def46]
xz-5.6.2-build/xz-5.6.2/src/xzdec/xzdec.c:197: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
#  195|   
#  196|   	strm->avail_in = 0;
#  197|-> 	strm->next_out = out_buf;
#  198|   	strm->avail_out = BUFSIZ;
#  199|   

Error: CPPCHECK_WARNING (CWE-562): [#def47]
xz-5.6.2-build/xz-5.6.2/src/xzdec/xzdec.c:204: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
#  202|   	while (true) {
#  203|   		if (strm->avail_in == 0) {
#  204|-> 			strm->next_in = in_buf;
#  205|   			strm->avail_in = fread(in_buf, 1, BUFSIZ, file);
#  206|   

Error: CPPCHECK_WARNING (CWE-562): [#def48]
xz-5.6.2-build/xz-5.6.2/src/xzdec/xzdec.c:242: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
#  240|   			}
#  241|   
#  242|-> 			strm->next_out = out_buf;
#  243|   			strm->avail_out = BUFSIZ;
#  244|   		}

Error: CLANG_WARNING: [#def49]
xz-5.6.2-build/xz-5.6.2/src/xzdec/xzdec.c:256:6: warning[core.StackAddressEscape]: Address of stack memory associated with local variable 'out_buf' is still referred to by the stack variable 'strm' upon returning to the caller.  This will be a dangling reference
#  254|   					ret = LZMA_DATA_ERROR;
#  255|   				else
#  256|-> 					return;
#  257|   #else
#  258|   				// lzma_stream_decoder() already guarantees

Error: CLANG_WARNING: [#def50]
xz-5.6.2-build/xz-5.6.2/src/xzdec/xzdec.c:263:5: warning[core.StackAddressEscape]: Address of stack memory associated with local variable 'out_buf' is still referred to by the stack variable 'strm' upon returning to the caller.  This will be a dangling reference
#  261|   				assert(action == LZMA_FINISH);
#  262|   				assert(feof(file));
#  263|-> 				return;
#  264|   #endif
#  265|   			}

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-110.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-namexz-5.6.2-1.fc41
store-results-to/tmp/tmpzcva8m72/xz-5.6.2-1.fc41.tar.xz
time-created2024-07-03 18:32:18
time-finished2024-07-03 18:34:20
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpzcva8m72/xz-5.6.2-1.fc41.tar.xz' '--gcc-analyze' '/tmp/tmpzcva8m72/xz-5.6.2-1.fc41.src.rpm'
tool-versioncsmock-3.5.3-1.el9