Error: GCC_ANALYZER_WARNING (CWE-401): [#def1] util-linux-2.40/misc-utils/uuidgen.c:22: included_from: Included from here. util-linux-2.40/include/xalloc.h: scope_hint: In function ‘unhex’ util-linux-2.40/include/xalloc.h:33:13: warning[-Wanalyzer-malloc-leak]: leak of ‘xmalloc((*valuelen >> 1) + 1)’ # 31| void *ret = malloc(size); # 32| # 33|-> if (!ret && size) # 34| err(XALLOC_EXIT_CODE, "cannot allocate %zu bytes", size); # 35| return ret; Error: GCC_ANALYZER_WARNING (CWE-476): [#def2] util-linux-2.40/misc-utils/blkid.c: scope_hint: In function ‘main’ util-linux-2.40/misc-utils/blkid.c:859:43: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘xcalloc((long unsigned int)(argc - optind), 8) + (long unsigned int)numdev * 8’ util-linux-2.40/misc-utils/blkid.c:47: included_from: Included from here. util-linux-2.40/misc-utils/blkid.c:17: included_from: Included from here. # 857| continue; # 858| # 859|-> devices[numdev++] = dev; # 860| } # 861| Error: GCC_ANALYZER_WARNING (CWE-476): [#def3] util-linux-2.40/misc-utils/cal.c: scope_hint: In function ‘monthly’ util-linux-2.40/misc-utils/cal.c:1016:28: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘xcalloc((long unsigned int)*ctl.months_in_row, 208)’ util-linux-2.40/misc-utils/cal.c:79: included_from: Included from here. # 1014| # 1015| for (i = 0; i < ctl->months_in_row - 1; i++) # 1016|-> ms[i].next = &ms[i + 1]; # 1017| # 1018| rows = (ctl->num_months - 1) / ctl->months_in_row; Error: GCC_ANALYZER_WARNING (CWE-476): [#def4] util-linux-2.40/misc-utils/hardlink.c: scope_hint: In function ‘get_sorted_xattr_name_table’ util-linux-2.40/misc-utils/hardlink.c:515:26: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘xmalloc((long unsigned int)n * 8)’ util-linux-2.40/misc-utils/hardlink.c: scope_hint: In function ‘get_sorted_xattr_name_table’ # 513| # 514| for (i = 0; i < n; i++) { # 515|-> table[i] = names; # 516| names += strlen(names) + 1; # 517| } Error: CLANG_WARNING: [#def5] util-linux-2.40/misc-utils/lslocks.c:244:7: warning[deadcode.DeadStores]: Although the value stored to 'sz' is used in the enclosing expression, the value is never actually read from 'sz' # 242| return NULL; # 243| # 244|-> if ((sz = strlen(path)) >= (sizeof(path) - 2)) # 245| goto out; # 246| Error: CLANG_WARNING: [#def6] util-linux-2.40/text-utils/more.c:1065:14: warning[core.UndefinedBinaryOperatorResult]: The left operand of '<' is a garbage value # 1063| } # 1064| # 1065|-> if ((*sp < ' ' && *sp != '\n') || *sp == CERASE) { # 1066| --ctl->prompt_len; # 1067| erase_one_column(ctl);
analyzer-version-clang | 18.1.3 |
analyzer-version-cppcheck | 2.13.0 |
analyzer-version-gcc | 14.0.1 |
analyzer-version-gcc-analyzer | 14.0.1 |
analyzer-version-shellcheck | 0.10.0 |
diffbase-analyzer-version-clang | 18.1.3 |
diffbase-analyzer-version-cppcheck | 2.13.0 |
diffbase-analyzer-version-gcc | 14.0.1 |
diffbase-analyzer-version-gcc-analyzer | 14.0.1 |
diffbase-analyzer-version-shellcheck | 0.10.0 |
diffbase-enabled-plugins | clang, cppcheck, gcc, shellcheck |
diffbase-exit-code | 0 |
diffbase-host | ip-172-16-1-215.us-west-2.compute.internal |
diffbase-mock-config | fedora-41-x86_64 |
diffbase-project-name | util-linux-2.40-0.9.rc1.fc40 |
diffbase-store-results-to | /tmp/tmpwvfo7ymj/util-linux-2.40-0.9.rc1.fc40.tar.xz |
diffbase-time-created | 2024-04-22 11:17:40 |
diffbase-time-finished | 2024-04-22 11:26:44 |
diffbase-tool | csmock |
diffbase-tool-args | '/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpwvfo7ymj/util-linux-2.40-0.9.rc1.fc40.tar.xz' '--gcc-analyze' '/tmp/tmpwvfo7ymj/util-linux-2.40-0.9.rc1.fc40.src.rpm' |
diffbase-tool-version | csmock-3.5.3-1.el9 |
enabled-plugins | clang, cppcheck, gcc, shellcheck |
exit-code | 0 |
host | ip-172-16-1-215.us-west-2.compute.internal |
mock-config | fedora-41-x86_64 |
project-name | util-linux-2.40-13.fc41 |
store-results-to | /tmp/tmpbzjl2sow/util-linux-2.40-13.fc41.tar.xz |
time-created | 2024-04-22 11:27:09 |
time-finished | 2024-04-22 11:36:31 |
title | Newly introduced defects |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpbzjl2sow/util-linux-2.40-13.fc41.tar.xz' '--gcc-analyze' '/tmp/tmpbzjl2sow/util-linux-2.40-13.fc41.src.rpm' |
tool-version | csmock-3.5.3-1.el9 |