Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37757445
en ru br
ALT Linux repos
S:B.02.19.2-alt2.1
5.0: 2.13-alt2
4.1: 2.12-alt1
4.0: 2.10-alt1
3.0: 2.05-alt1

Group :: System/Kernel and hardware
RPM: lshw

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: lshw-non-root.patch
Download


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);
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin