Error: CPPCHECK_WARNING: [#def1] xz-5.4.6-build/xz-5.4.6/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.4.6-build/xz-5.4.6/src/common/tuklib_open_stdxxx.c: scope_hint: In function ‘tuklib_open_stdxxx’ xz-5.4.6-build/xz-5.4.6/src/common/tuklib_open_stdxxx.c:41:28: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", <unknown>)’ # 39| | (i == 0 ? O_WRONLY : O_RDONLY)); # 40| # 41|-> if (fd != i) { # 42| if (fd != -1) # 43| (void)close(fd); Error: CPPCHECK_WARNING: [#def3] xz-5.4.6-build/xz-5.4.6/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.4.6-build/xz-5.4.6/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.4.6-build/xz-5.4.6/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.4.6-build/xz-5.4.6/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.4.6-build/xz-5.4.6/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.4.6-build/xz-5.4.6/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.4.6-build/xz-5.4.6/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.4.6-build/xz-5.4.6/src/liblzma/common/filter_common.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: GCC_ANALYZER_WARNING (CWE-476): [#def11] xz-5.4.6-build/xz-5.4.6/src/liblzma/common/filter_encoder.c: scope_hint: In function 'lzma_mt_block_size' xz-5.4.6-build/xz-5.4.6/src/liblzma/common/filter_encoder.c:259:23: warning[-Wanalyzer-null-dereference]: dereference of NULL '0' xz-5.4.6-build/xz-5.4.6/src/liblzma/common/filter_encoder.c: scope_hint: In function 'lzma_mt_block_size' # 257| const lzma_filter_encoder *const fe # 258| = encoder_find(filters[i].id); # 259|-> if (fe->block_size != NULL) { # 260| const uint64_t size # 261| = fe->block_size(filters[i].options); Error: CPPCHECK_WARNING: [#def12] xz-5.4.6-build/xz-5.4.6/src/liblzma/common/filter_flags_encoder.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: [#def13] xz-5.4.6-build/xz-5.4.6/src/liblzma/common/index.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CLANG_WARNING: [#def14] xz-5.4.6-build/xz-5.4.6/src/liblzma/common/index.c:266:11: warning[core.NullDereference]: Access to field 'parent' results in a dereference of a null pointer (loaded from variable 'node') # 264| up = ctz32(tree->count) + 2; # 265| do { # 266|-> node = node->parent; # 267| } while (--up > 0); # 268| Error: CLANG_WARNING: [#def15] xz-5.4.6-build/xz-5.4.6/src/liblzma/common/index.c:270:28: warning[core.NullDereference]: Access to field 'right' results in a dereference of a null pointer (loaded from variable 'node') # 268| # 269| // Rotate left using node as the rotation root. # 270|-> index_tree_node *pivot = node->right; # 271| # 272| if (node->parent == NULL) { Error: GCC_ANALYZER_WARNING (CWE-476): [#def16] xz-5.4.6-build/xz-5.4.6/src/liblzma/common/index.c:319:32: warning[-Wanalyzer-null-dereference]: dereference of NULL 'result' xz-5.4.6-build/xz-5.4.6/src/liblzma/common/index.c: scope_hint: In function 'lzma_index_iter_locate' xz-5.4.6-build/xz-5.4.6/src/liblzma/common/index.c: scope_hint: In function 'lzma_index_iter_locate' # 317| { # 318| const index_tree_node *result = NULL; # 319|-> const index_tree_node *node = tree->root; # 320| # 321| assert(tree->leftmost == NULL Error: GCC_ANALYZER_WARNING (CWE-476): [#def17] xz-5.4.6-build/xz-5.4.6/src/liblzma/common/index.c: scope_hint: In function 'lzma_index_iter_locate' xz-5.4.6-build/xz-5.4.6/src/liblzma/common/index.c:1252:16: warning[-Wanalyzer-null-dereference]: dereference of NULL 'result' xz-5.4.6-build/xz-5.4.6/src/liblzma/common/index.c: scope_hint: In function 'lzma_index_iter_locate' # 1250| // we don't want to return them. # 1251| size_t left = 0; # 1252|-> size_t right = group->last; # 1253| # 1254| while (left < right) { Error: CPPCHECK_WARNING: [#def18] xz-5.4.6-build/xz-5.4.6/src/liblzma/common/microlzma_decoder.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: [#def19] xz-5.4.6-build/xz-5.4.6/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): [#def20] xz-5.4.6-build/xz-5.4.6/src/liblzma/common/stream_decoder.c:219: error[uninitvar]: Uninitialized variable: filters # 217| # 218| // Check the memory usage limit. # 219|-> const uint64_t memusage = lzma_raw_decoder_memusage(filters); # 220| lzma_ret ret; # 221| Error: CPPCHECK_WARNING: [#def21] xz-5.4.6-build/xz-5.4.6/src/liblzma/common/stream_decoder_mt.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: [#def22] xz-5.4.6-build/xz-5.4.6/src/liblzma/common/stream_encoder.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: [#def23] xz-5.4.6-build/xz-5.4.6/src/liblzma/common/stream_encoder_mt.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: [#def24] xz-5.4.6-build/xz-5.4.6/src/liblzma/common/string_conversion.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: [#def25] xz-5.4.6-build/xz-5.4.6/src/liblzma/lz/lz_decoder.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: [#def26] xz-5.4.6-build/xz-5.4.6/src/liblzma/lz/lz_encoder.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: [#def27] xz-5.4.6-build/xz-5.4.6/src/liblzma/lzma/lzma2_decoder.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: [#def28] xz-5.4.6-build/xz-5.4.6/src/liblzma/lzma/lzma_decoder.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: [#def29] xz-5.4.6-build/xz-5.4.6/src/liblzma/lzma/lzma_encoder.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: [#def30] xz-5.4.6-build/xz-5.4.6/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: [#def31] xz-5.4.6-build/xz-5.4.6/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: [#def32] xz-5.4.6-build/xz-5.4.6/src/liblzma/simple/ia64.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: [#def33] xz-5.4.6-build/xz-5.4.6/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.4.6-build/xz-5.4.6/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.4.6-build/xz-5.4.6/src/xz/args.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CLANG_WARNING: [#def36] xz-5.4.6-build/xz-5.4.6/src/xz/args.c:97:13: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull' # 95| for (size_t i = 0; i < count; ++i) { # 96| // Locate the next comma and replace it with \0. # 97|-> char *p = strchr(str, ','); # 98| if (p != NULL) # 99| *p = '\0'; Error: CPPCHECK_WARNING: [#def37] xz-5.4.6-build/xz-5.4.6/src/xz/coder.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: [#def38] xz-5.4.6-build/xz-5.4.6/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.4.6-build/xz-5.4.6/src/xz/hardware.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: [#def40] xz-5.4.6-build/xz-5.4.6/src/xz/list.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: [#def41] xz-5.4.6-build/xz-5.4.6/src/xz/main.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: [#def42] xz-5.4.6-build/xz-5.4.6/src/xz/message.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: [#def43] xz-5.4.6-build/xz-5.4.6/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.4.6-build/xz-5.4.6/src/xz/util.c:156: error[zerodiv]: Division by zero. # 154| # 155| // Don't overflow here either. # 156|-> if (result > UINT64_MAX / multiplier) # 157| goto error; # 158| Error: CPPCHECK_WARNING: [#def45] xz-5.4.6-build/xz-5.4.6/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.4.6-build/xz-5.4.6/src/xzdec/xzdec.c:171: error[autoVariables]: Address of local auto-variable assigned to a function parameter. # 169| # 170| strm->avail_in = 0; # 171|-> strm->next_out = out_buf; # 172| strm->avail_out = BUFSIZ; # 173| Error: CPPCHECK_WARNING (CWE-562): [#def47] xz-5.4.6-build/xz-5.4.6/src/xzdec/xzdec.c:178: error[autoVariables]: Address of local auto-variable assigned to a function parameter. # 176| while (true) { # 177| if (strm->avail_in == 0) { # 178|-> strm->next_in = in_buf; # 179| strm->avail_in = fread(in_buf, 1, BUFSIZ, file); # 180| Error: CPPCHECK_WARNING (CWE-562): [#def48] xz-5.4.6-build/xz-5.4.6/src/xzdec/xzdec.c:216: error[autoVariables]: Address of local auto-variable assigned to a function parameter. # 214| } # 215| # 216|-> strm->next_out = out_buf; # 217| strm->avail_out = BUFSIZ; # 218| } Error: CLANG_WARNING: [#def49] xz-5.4.6-build/xz-5.4.6/src/xzdec/xzdec.c:230: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 # 228| ret = LZMA_DATA_ERROR; # 229| else # 230|-> return; # 231| #else # 232| // lzma_stream_decoder() already guarantees Error: CLANG_WARNING: [#def50] xz-5.4.6-build/xz-5.4.6/src/xzdec/xzdec.c:237: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 # 235| assert(action == LZMA_FINISH); # 236| assert(feof(file)); # 237|-> return; # 238| #endif # 239| }
| analyzer-version-clang | 18.1.7 |
| analyzer-version-cppcheck | 2.14.2 |
| analyzer-version-gcc | 14.1.1 |
| analyzer-version-gcc-analyzer | 14.1.1 |
| analyzer-version-shellcheck | 0.10.0 |
| enabled-plugins | clang, cppcheck, gcc, shellcheck |
| exit-code | 0 |
| host | ip-172-16-1-110.us-west-2.compute.internal |
| mock-config | fedora-41-x86_64 |
| project-name | xz-5.4.6-3.fc40 |
| store-results-to | /tmp/tmp6248fx1j/xz-5.4.6-3.fc40.tar.xz |
| time-created | 2024-07-03 18:29:35 |
| time-finished | 2024-07-03 18:32:02 |
| tool | csmock |
| tool-args | '/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmp6248fx1j/xz-5.4.6-3.fc40.tar.xz' '--gcc-analyze' '/tmp/tmp6248fx1j/xz-5.4.6-3.fc40.src.rpm' |
| tool-version | csmock-3.5.3-1.el9 |