Task #102900 - libblockdev-3.4.0-1.20260306144038053183.pr1177.102.ga7ab00fb/scan-results.err
back to task #102900download
Error: GCC_ANALYZER_WARNING (CWE-688):
libblockdev-3.4.0/src/plugins/crypto.c: scope_hint: In function 'bd_crypto_escrow_device'
libblockdev-3.4.0/src/plugins/crypto.c:3512: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:3511: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
# 3510|
# 3511| cert_data_copy = g_strdup (cert_data);
# 3512|-> cert = CERT_DecodeCertFromPackage (cert_data_copy, strlen (cert_data_copy));
# 3513| if (!cert) {
# 3514| g_set_error (&l_error, BD_CRYPTO_ERROR, BD_CRYPTO_ERROR_CERT_DECODE,
Error: GCC_ANALYZER_WARNING (CWE-787):
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-775):
libblockdev-3.4.0/src/plugins/nvme/nvme-info.c: scope_hint: In function 'bd_nvme_get_controller_info'
libblockdev-3.4.0/src/plugins/nvme/nvme-info.c:406:37: warning[-Wanalyzer-fd-leak]: leak of file descriptor '_open_dev(device, error)'
libblockdev-3.4.0/src/plugins/nvme/nvme-info.c:410:19: note: in expansion of macro 'ROUND_UP'
libblockdev-3.4.0/src/plugins/nvme/nvme-info.c:410:19: note: in expansion of macro 'ROUND_UP'
# 404|
# 405| /* backported from nvme-cli: https://github.com/linux-nvme/nvme-cli/pull/2051 */
# 406|-> #define ROUND_UP(N, S) ((((N) + (S) - 1) / (S)) * (S))
# 407|
# 408| void *_nvme_alloc (size_t len, GError **error)
Error: GCC_ANALYZER_WARNING (CWE-476):
libblockdev-3.4.0/src/plugins/part.c: scope_hint: In function 'bd_part_delete_part'
libblockdev-3.4.0/src/plugins/part.c:1367:55: warning[-Wanalyzer-null-dereference]: dereference of NULL 'l_error'
# 1365| part_num = get_part_num (part, &l_error);
# 1366| if (part_num == -1) {
# 1367|-> bd_utils_report_finished (progress_id, l_error->message);
# 1368| g_propagate_error (error, l_error);
# 1369| return FALSE;
Error: GCC_ANALYZER_WARNING (CWE-476):
libblockdev-3.4.0/src/plugins/part.c: scope_hint: In function 'bd_part_resize_part'
libblockdev-3.4.0/src/plugins/part.c:1529:55: warning[-Wanalyzer-null-dereference]: dereference of NULL 'l_error'
# 1527| part_num = get_part_num (part, &l_error);
# 1528| if (part_num == -1) {
# 1529|-> bd_utils_report_finished (progress_id, l_error->message);
# 1530| g_propagate_error (error, l_error);
# 1531| return FALSE;
Error: GCC_ANALYZER_WARNING (CWE-476):
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:1846:55: warning[-Wanalyzer-null-dereference]: dereference of NULL 'l_error'
# 1844| if (part_num == -1) {
# 1845| close_context (cxt);
# 1846|-> bd_utils_report_finished (progress_id, l_error->message);
# 1847| g_propagate_error (error, l_error);
# 1848| return FALSE;
Error: GCC_ANALYZER_WARNING (CWE-476):
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:1927:55: warning[-Wanalyzer-null-dereference]: dereference of NULL 'l_error'
# 1925| part_num = get_part_num (part, &l_error);
# 1926| if (part_num == -1) {
# 1927|-> bd_utils_report_finished (progress_id, l_error->message);
# 1928| g_propagate_error (error, l_error);
# 1929| return FALSE;
Error: GCC_ANALYZER_WARNING (CWE-476):
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:1986:55: warning[-Wanalyzer-null-dereference]: dereference of NULL 'l_error'
# 1984| part_num = get_part_num (part, &l_error);
# 1985| if (part_num == -1) {
# 1986|-> bd_utils_report_finished (progress_id, l_error->message);
# 1987| g_propagate_error (error, l_error);
# 1988| return FALSE;
Error: GCC_ANALYZER_WARNING (CWE-476):
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:2077:55: warning[-Wanalyzer-null-dereference]: dereference of NULL 'l_error'
# 2075| if (part_num == -1) {
# 2076| close_context (cxt);
# 2077|-> bd_utils_report_finished (progress_id, l_error->message);
# 2078| g_propagate_error (error, l_error);
# 2079| return FALSE;
Error: GCC_ANALYZER_WARNING (CWE-688):
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));