libblockdev-3.4.0-1.20260306130811514054.pr1176.151.g0176603c

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-688): [#def1]
libblockdev-3.4.0/src/plugins/crypto.c: scope_hint: In function 'bd_crypto_escrow_device'
libblockdev-3.4.0/src/plugins/crypto.c:3520:56: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
/usr/include/glib-2.0/glib/gstring.h:37: included_from: Included from here.
/usr/include/glib-2.0/glib/giochannel.h:36: included_from: Included from here.
/usr/include/glib-2.0/glib.h:56: included_from: Included from here.
libblockdev-3.4.0/src/plugins/crypto.c:21: included_from: Included from here.
libblockdev-3.4.0/src/plugins/crypto.c:3519:22: note: in expansion of macro 'g_strdup'
libblockdev-3.4.0/src/plugins/crypto.c: scope_hint: In function 'bd_crypto_escrow_device'
libblockdev-3.4.0/src/plugins/crypto.c:20: included_from: Included from here.
/usr/include/string.h:439:15: note: argument 1 of 'strlen' must be non-null
# 3518|   
# 3519|       cert_data_copy = g_strdup (cert_data);
# 3520|->     cert = CERT_DecodeCertFromPackage (cert_data_copy, strlen (cert_data_copy));
# 3521|       if (!cert) {
# 3522|           g_set_error (&l_error, BD_CRYPTO_ERROR, BD_CRYPTO_ERROR_CERT_DECODE,

Error: GCC_ANALYZER_WARNING (CWE-787): [#def2]
libblockdev-3.4.0/src/plugins/nvme/nvme-error.c: scope_hint: In function '_nvme_fabrics_errno_to_gerror'
libblockdev-3.4.0/src/plugins/nvme/nvme-error.c:108:9: warning[-Wanalyzer-out-of-bounds]: buffer over-read
libblockdev-3.4.0/src/plugins/nvme/nvme-error.c:108:9: note: valid subscripts for 'CSWTCH' are '[0]' to '[16]'
#  106|   
#  107|       if (_errno >= ENVME_CONNECT_RESOLVE) {
#  108|->         switch (_errno) {
#  109|               case ENVME_CONNECT_ADDRFAM:
#  110|               case ENVME_CONNECT_TRADDR:

Error: GCC_ANALYZER_WARNING (CWE-476): [#def3]
libblockdev-3.4.0/src/plugins/part.c: scope_hint: In function 'bd_part_delete_part'
libblockdev-3.4.0/src/plugins/part.c:1370:55: warning[-Wanalyzer-null-dereference]: dereference of NULL 'l_error'
# 1368|       part_num = get_part_num (part, &l_error);
# 1369|       if (part_num == -1) {
# 1370|->         bd_utils_report_finished (progress_id, l_error->message);
# 1371|           g_propagate_error (error, l_error);
# 1372|           return FALSE;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def4]
libblockdev-3.4.0/src/plugins/part.c: scope_hint: In function 'bd_part_resize_part'
libblockdev-3.4.0/src/plugins/part.c:1532:55: warning[-Wanalyzer-null-dereference]: dereference of NULL 'l_error'
# 1530|       part_num = get_part_num (part, &l_error);
# 1531|       if (part_num == -1) {
# 1532|->         bd_utils_report_finished (progress_id, l_error->message);
# 1533|           g_propagate_error (error, l_error);
# 1534|           return FALSE;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def5]
libblockdev-3.4.0/src/plugins/part.c: scope_hint: In function 'bd_part_set_part_name'
libblockdev-3.4.0/src/plugins/part.c:1863:55: warning[-Wanalyzer-null-dereference]: dereference of NULL 'l_error'
# 1861|       if (part_num == -1) {
# 1862|           close_context (cxt);
# 1863|->         bd_utils_report_finished (progress_id, l_error->message);
# 1864|           g_propagate_error (error, l_error);
# 1865|           return FALSE;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def6]
libblockdev-3.4.0/src/plugins/part.c: scope_hint: In function 'bd_part_set_part_type'
libblockdev-3.4.0/src/plugins/part.c:1944:55: warning[-Wanalyzer-null-dereference]: dereference of NULL 'l_error'
# 1942|       part_num = get_part_num (part, &l_error);
# 1943|       if (part_num == -1) {
# 1944|->         bd_utils_report_finished (progress_id, l_error->message);
# 1945|           g_propagate_error (error, l_error);
# 1946|           return FALSE;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def7]
libblockdev-3.4.0/src/plugins/part.c: scope_hint: In function 'bd_part_set_part_id'
libblockdev-3.4.0/src/plugins/part.c:2003:55: warning[-Wanalyzer-null-dereference]: dereference of NULL 'l_error'
# 2001|       part_num = get_part_num (part, &l_error);
# 2002|       if (part_num == -1) {
# 2003|->         bd_utils_report_finished (progress_id, l_error->message);
# 2004|           g_propagate_error (error, l_error);
# 2005|           return FALSE;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def8]
libblockdev-3.4.0/src/plugins/part.c: scope_hint: In function 'bd_part_set_part_uuid'
libblockdev-3.4.0/src/plugins/part.c:2096:55: warning[-Wanalyzer-null-dereference]: dereference of NULL 'l_error'
# 2094|       if (part_num == -1) {
# 2095|           close_context (cxt);
# 2096|->         bd_utils_report_finished (progress_id, l_error->message);
# 2097|           g_propagate_error (error, l_error);
# 2098|           return FALSE;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def9]
libblockdev-3.4.0/src/utils/dev_utils.c: scope_hint: In function '_is_block_device'
libblockdev-3.4.0/src/utils/dev_utils.c:38:9: warning[-Wanalyzer-null-argument]: use of NULL 'path' where non-null expected
/usr/include/glib-2.0/glib/gstring.h:37: included_from: Included from here.
/usr/include/glib-2.0/glib/giochannel.h:36: included_from: Included from here.
/usr/include/glib-2.0/glib.h:56: included_from: Included from here.
libblockdev-3.4.0/src/utils/dev_utils.c:20: included_from: Included from here.
libblockdev-3.4.0/src/utils/dev_utils.c:70:16: note: in expansion of macro 'g_strdup'
libblockdev-3.4.0/src/utils/dev_utils.c: scope_hint: In function '_is_block_device'
libblockdev-3.4.0/src/utils/dev_utils.c:22: included_from: Included from here.
/usr/include/sys/stat.h:205:12: note: argument 1 of 'stat' must be non-null
#   36|       struct stat sb;
#   37|   
#   38|->     if (stat (path, &sb) != 0) {
#   39|           g_set_error (error, BD_UTILS_DEV_UTILS_ERROR, BD_UTILS_DEV_UTILS_ERROR_FAILED,
#   40|                        "Failed to stat '%s': %s", path, strerror_l (errno, _C_LOCALE));

Scan Properties

analyzer-version-clippy1.93.1
analyzer-version-cppcheck2.20.0
analyzer-version-gcc16.0.1
analyzer-version-gcc-analyzer16.0.1
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-70.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20260225.110632.gf6ecc5a.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namelibblockdev-3.4.0-1.20260306130811514054.pr1176.151.g0176603c
store-results-to/tmp/tmpcq0alh8l/libblockdev-3.4.0-1.20260306130811514054.pr1176.151.g0176603c.tar.xz
time-created2026-03-06 13:17:16
time-finished2026-03-06 13:20:07
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,clippy,cppcheck,shellcheck,gcc' '-o' '/tmp/tmpcq0alh8l/libblockdev-3.4.0-1.20260306130811514054.pr1176.151.g0176603c.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '/tmp/tmpcq0alh8l/libblockdev-3.4.0-1.20260306130811514054.pr1176.151.g0176603c.src.rpm'
tool-versioncsmock-3.8.4.20260302.153719.g8203630-1.el9