14 lines
504 B
Diff
14 lines
504 B
Diff
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);
|