Skip to content

Commit

Permalink
fix potential crash
Browse files Browse the repository at this point in the history
cf. Github PR#47
  • Loading branch information
lyonel committed Jan 10, 2021
1 parent c86aa13 commit ff634c9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/dmi.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1924,6 +1924,8 @@ static bool scan_dmi_sysfs(hwNode & n)

ifstream ep_stream(SYSFSDMI "/smbios_entry_point",
ifstream::in | ifstream::binary | ifstream::ate);
if (!ep_stream)
return false;
ifstream::pos_type ep_len = ep_stream.tellg();
vector < u8 > ep_buf(ep_len);
ep_stream.seekg(0, ifstream::beg);
Expand Down

0 comments on commit ff634c9

Please sign in to comment.