diff --git a/lshw-B.02.18-non-root.patch b/lshw-B.02.18-non-root.patch new file mode 100644 index 0000000..83b4dbb --- /dev/null +++ b/lshw-B.02.18-non-root.patch @@ -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); diff --git a/lshw.spec b/lshw.spec index 9c42a35..0607427 100644 --- a/lshw.spec +++ b/lshw.spec @@ -1,7 +1,7 @@ Summary: Hardware lister Name: lshw Version: B.02.18 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 Group: Applications/System 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 Source2: org.ezix.lshw.gui.policy Source3: lshw-gui +Patch1: lshw-B.02.18-non-root.patch Requires: hwdata %description lshw is a small tool to provide detailed informaton on the hardware @@ -33,6 +34,7 @@ format. %prep %setup -q +%patch01 -p1 %build 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 %changelog +* Wed May 18 2016 Terje Rosten - B.02.18-3 +- Add patch to fix crash (bz#1332486) + * Mon Apr 25 2016 Terje Rosten - B.02.18-2 - Date fix