Add patch to fix crash (bz#1332486)
This commit is contained in:
parent
a6710141f9
commit
1f3a87e120
13
lshw-B.02.18-non-root.patch
Normal file
13
lshw-B.02.18-non-root.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
diff --git a/src/core/dmi.cc b/src/core/dmi.cc
|
||||||
|
index ced891a..e89ff93 100644
|
||||||
|
--- a/src/core/dmi.cc
|
||||||
|
+++ b/src/core/dmi.cc
|
||||||
|
@@ -1833,6 +1833,8 @@ static bool scan_dmi_sysfs(hwNode & n)
|
||||||
|
ifstream ep_stream(SYSFSDMI "/smbios_entry_point",
|
||||||
|
ifstream::in | ifstream::binary | ifstream::ate);
|
||||||
|
ifstream::pos_type ep_len = ep_stream.tellg();
|
||||||
|
+ if (ep_len == -1)
|
||||||
|
+ return false;
|
||||||
|
vector < u8 > ep_buf(ep_len);
|
||||||
|
ep_stream.seekg(0, ifstream::beg);
|
||||||
|
ep_stream.read((char *)ep_buf.data(), ep_len);
|
@ -1,7 +1,7 @@
|
|||||||
Summary: Hardware lister
|
Summary: Hardware lister
|
||||||
Name: lshw
|
Name: lshw
|
||||||
Version: B.02.18
|
Version: B.02.18
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
Group: Applications/System
|
Group: Applications/System
|
||||||
URL: http://ezix.org/project/wiki/HardwareLiSter
|
URL: http://ezix.org/project/wiki/HardwareLiSter
|
||||||
@ -9,6 +9,7 @@ Source0: http://www.ezix.org/software/files/lshw-%{version}.tar.gz
|
|||||||
Source1: lshw.desktop
|
Source1: lshw.desktop
|
||||||
Source2: org.ezix.lshw.gui.policy
|
Source2: org.ezix.lshw.gui.policy
|
||||||
Source3: lshw-gui
|
Source3: lshw-gui
|
||||||
|
Patch1: lshw-B.02.18-non-root.patch
|
||||||
Requires: hwdata
|
Requires: hwdata
|
||||||
%description
|
%description
|
||||||
lshw is a small tool to provide detailed informaton on the hardware
|
lshw is a small tool to provide detailed informaton on the hardware
|
||||||
@ -33,6 +34,7 @@ format.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%patch01 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
make %{?_smp_mflags} SBINDIR="%{_sbindir}" RPM_OPT_FLAGS="%{optflags}" gui
|
make %{?_smp_mflags} SBINDIR="%{_sbindir}" RPM_OPT_FLAGS="%{optflags}" gui
|
||||||
@ -101,6 +103,9 @@ rm -rf %{buildroot}%{_datadir}/locale/fr/
|
|||||||
%{_datadir}/polkit-1/actions/org.ezix.lshw.gui.policy
|
%{_datadir}/polkit-1/actions/org.ezix.lshw.gui.policy
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed May 18 2016 Terje Rosten <terje.rosten@ntnu.no> - B.02.18-3
|
||||||
|
- Add patch to fix crash (bz#1332486)
|
||||||
|
|
||||||
* Mon Apr 25 2016 Terje Rosten <terje.rosten@ntnu.no> - B.02.18-2
|
* Mon Apr 25 2016 Terje Rosten <terje.rosten@ntnu.no> - B.02.18-2
|
||||||
- Date fix
|
- Date fix
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user