diff options
author | Lioncash <mathew1800@gmail.com> | 2018-10-13 08:12:00 -0400 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2018-10-13 08:24:18 -0400 |
commit | ef5639bfbbeb7d83bd66e3faf3e88e4aa1e05a6e (patch) | |
tree | 80c8f1dbccfb4dd33978e317d097befa8886ab74 /src/core/core.cpp | |
parent | 82ea1cf35a2b10bb7a2cfbaa0d9bac98fe5bb182 (diff) |
key_manager: Don't assume file seeks and reads will always succeed
Given the filesystem should always be assumed to be volatile, we should
check and bail out if a seek operation isn't successful. This'll prevent
potentially writing/returning garbage data from the function in rare
cases.
This also allows removing a check to see if an offset is within the
bounds of a file before perfoming a seek operation. If a seek is
attempted beyond the end of a file, it will fail, so this essentially
combines two checks into one in one place.
Diffstat (limited to 'src/core/core.cpp')
0 files changed, 0 insertions, 0 deletions