coreboot-kgpe-d16/util/amdfwtool
Richard Spiegel bff4545ccf 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>
2018-01-23 20:10:52 +00:00
..
Makefile
amdfwtool.c util/amdfwtool/amdfwtool.c: Check for negative return 2018-01-23 20:10:52 +00:00