diff options
author | Richard Spiegel <richard.spiegel@silverbackltd.com> | 2018-01-17 09:58:13 -0700 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2018-01-23 20:10:52 +0000 |
commit | bff4545ccfdc8ac1ae9848881a85937bff8edb94 (patch) | |
tree | d1ee5846e296ecbc5abe095db53e3f686929976f /3rdparty | |
parent | 8bd8cd3a222bb8d54fd2510728c87dc6909b287c (diff) | |
download | coreboot-bff4545ccfdc8ac1ae9848881a85937bff8edb94.tar.gz coreboot-bff4545ccfdc8ac1ae9848881a85937bff8edb94.tar.bz2 coreboot-bff4545ccfdc8ac1ae9848881a85937bff8edb94.zip |
util/amdfwtool/amdfwtool.c: Check for negative return
File open function <open()> will return -1 if there's any error. Check that
the return is greater or equal to 0 before using fstat(). Print error message
and exit if there's an error.
This fixes CIDs 1353018, 1353020, 1353027 and 1353028
BUG=b:72062481
TEST=Build no errors
Change-Id: I77d6973d1ad1eadb93922866e618038045be5937
Signed-off-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
Reviewed-on: https://review.coreboot.org/23303
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to '3rdparty')
0 files changed, 0 insertions, 0 deletions