[coreboot-gerrit] New patch to review for coreboot: util/broadcom: Add two more NULL checks
Patrick Georgi (pgeorgi@google.com)
gerrit at coreboot.org
Thu Dec 15 15:05:01 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/17882
-gerrit
commit 0c26c4f96d28e082e4f721649f329039a60e444f
Author: Patrick Georgi <pgeorgi at chromium.org>
Date: Thu Dec 15 15:03:55 2016 +0100
util/broadcom: Add two more NULL checks
Change-Id: I088730fd87dd39fa2c36a06c5770fad05a5808b0
Signed-off-by: Patrick Georgi <pgeorgi at chromium.org>
Found-by: Coverity Scan #1323511, #1323512
---
util/broadcom/secimage/sbi.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/util/broadcom/secimage/sbi.c b/util/broadcom/secimage/sbi.c
index d972ba4..f56f896 100644
--- a/util/broadcom/secimage/sbi.c
+++ b/util/broadcom/secimage/sbi.c
@@ -109,6 +109,11 @@ int CreateSecureBootImage(int ac, char **av)
--ac, ++av;
}
+ if (!bl) {
+ puts("-bl not set");
+ return -1;
+ }
+
if (stat(bl, &file_stat) == -1) {
puts("Can't stat bl");
return -1;
@@ -136,6 +141,11 @@ int CreateSecureBootImage(int ac, char **av)
if (configfile)
FillHeaderFromConfigFile(buf, configfile);
+ if (!privkey) {
+ status = -1;
+ goto done;
+ }
+
status = AddImagePayload(buf, bl, filesize);
if (status) {
status = -1;
More information about the coreboot-gerrit
mailing list