From f150ac7a8e5cbe689a59afce16dfaa65a8b06aeb Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Tue, 18 May 2021 02:37:14 -0400 Subject: [PATCH] import lsscsi-0.32-2.el8 --- .gitignore | 2 +- .lsscsi.metadata | 2 +- ...scsi-0.32-fix-uninitialized-variable.patch | 34 +++++++++++++++++++ SPECS/lsscsi.spec | 17 ++++++++-- 4 files changed, 50 insertions(+), 5 deletions(-) create mode 100644 SOURCES/lsscsi-0.32-fix-uninitialized-variable.patch diff --git a/.gitignore b/.gitignore index 9e9eed1..ea75485 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/lsscsi-0.30.tgz +SOURCES/lsscsi-0.32.tgz diff --git a/.lsscsi.metadata b/.lsscsi.metadata index c96705a..a59724f 100644 --- a/.lsscsi.metadata +++ b/.lsscsi.metadata @@ -1 +1 @@ -7413c9eda75cf14e1f094a34b3e4ca05fda90fe8 SOURCES/lsscsi-0.30.tgz +2660fb6e16d2128869e89cd353d37d45ba8cd2f9 SOURCES/lsscsi-0.32.tgz diff --git a/SOURCES/lsscsi-0.32-fix-uninitialized-variable.patch b/SOURCES/lsscsi-0.32-fix-uninitialized-variable.patch new file mode 100644 index 0000000..68a295a --- /dev/null +++ b/SOURCES/lsscsi-0.32-fix-uninitialized-variable.patch @@ -0,0 +1,34 @@ +From db8d419ba39e4547de602ef1ff58cd97d5e1102d Mon Sep 17 00:00:00 2001 +From: Tomas Bzatek +Date: Wed, 11 Nov 2020 15:39:16 +0100 +Subject: [PATCH] fix uninitialized variable + +Error: UNINIT (CWE-457): [#def1] +lsscsi-032r164/src/lsscsi.c:3341: var_decl: Declaring variable "type" without initializer. +lsscsi-032r164/src/lsscsi.c:3586: uninit_use_in_call: Using uninitialized value "type" when calling "is_direct_access_dev". + 3584| my_strcopy(blkdir, buff, sizeof(blkdir)); + 3585| value[0] = 0; + 3586|-> if (! (is_direct_access_dev(type) && + 3587| block_scan(blkdir) && + 3588| if_directory_chdir(blkdir, ".") && +--- + src/lsscsi.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/lsscsi.c b/src/lsscsi.c +index 6544153..8a30299 100644 +--- a/src/lsscsi.c ++++ b/src/lsscsi.c +@@ -3338,7 +3338,8 @@ one_sdev_entry(const char * dir_name, const char * devname, + const struct lsscsi_opts * op) + { + bool get_wwn = false; +- int type, n, vlen; ++ int type = 0; ++ int n, vlen; + int devname_len = 13; + char buff[LMAX_DEVPATH]; + char extra[LMAX_DEVPATH]; +-- +2.26.2 + diff --git a/SPECS/lsscsi.spec b/SPECS/lsscsi.spec index a70a3d5..f8c2dcc 100644 --- a/SPECS/lsscsi.spec +++ b/SPECS/lsscsi.spec @@ -1,11 +1,13 @@ Summary: List SCSI devices (or hosts) and associated information Name: lsscsi -Version: 0.30 -Release: 1%{?dist} +Version: 0.32 +Release: 2%{?dist} License: GPLv2+ Group: Applications/System +# official git repository: https://github.com/doug-gilbert/lsscsi Source0: http://sg.danny.cz/scsi/%{name}-%{version}.tgz URL: http://sg.danny.cz/scsi/lsscsi.html +Patch0: lsscsi-0.32-fix-uninitialized-variable.patch %description Uses information provided by the sysfs pseudo file system in Linux kernel @@ -19,7 +21,7 @@ Author: %prep -%setup -q -n %{name}-030r154 +%autosetup -p 1 -n %{name}-032r164 %build %configure @@ -36,6 +38,15 @@ make DESTDIR=%{buildroot} install %changelog +* Wed Nov 11 2020 Tomas Bzatek - 0.32-2 +- Fix an unitialized variable (Covscan) + +* Tue Nov 10 2020 Tomas Bzatek - 0.32-1 +- Upgrade to 0.32 upstream snapshot (#1855766) +- Fix NVMe device parsing (#1687841, #1845977) +- Fix WWN string reporting (#1846559) +- Implement SCSI identifier sort priority (#1846566) + * Fri Aug 10 2018 Gris Ge 0.30-1 - Upgrade to 0.30 release.