[coreboot-gerrit] New patch to review for coreboot: util/broadcom: Check for successful file access
Patrick Georgi (pgeorgi@google.com)
gerrit at coreboot.org
Thu Dec 15 15:04:56 CET 2016
Patrick Georgi (pgeorgi at google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17877
-gerrit
commit 6bf52a7f023043a71a99e125148d5a8273176379
Author: Patrick Georgi <pgeorgi at chromium.org>
Date: Thu Dec 15 14:53:23 2016 +0100
util/broadcom: Check for successful file access
Change-Id: I5c77b3c5ea3fbc249a8c564a521c2c3c45e1c560
Signed-off-by: Patrick Georgi <pgeorgi at chromium.org>
Found-by: Coverity Scan #1323510
---
util/broadcom/secimage/io.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/util/broadcom/secimage/io.c b/util/broadcom/secimage/io.c
index d71065c..e2ba693 100644
--- a/util/broadcom/secimage/io.c
+++ b/util/broadcom/secimage/io.c
@@ -73,6 +73,10 @@ int DataRead(char *filename, uint8_t *buf, int *length)
return -1;
}
len = FileSizeGet(file);
+ if (len < 0) {
+ printf("Unable to seek in file: %s\n", filename);
+ return -1;
+ }
if (len < *length)
*length = len;
else
More information about the coreboot-gerrit
mailing list