summaryrefslogtreecommitdiff
path: root/util/broadcom
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@chromium.org>2016-12-15 15:03:55 +0100
committerPatrick Georgi <pgeorgi@google.com>2016-12-16 15:56:35 +0100
commit8c47b1f833cf83c635bdb04f3c6c363bdc3e6669 (patch)
tree99765fb26dfbda07b324f460b37ea30e879d0b4e /util/broadcom
parenta3e928cdf654b5e4923b0d51ada98969886205b8 (diff)
util/broadcom: Add two more NULL checks
Change-Id: I088730fd87dd39fa2c36a06c5770fad05a5808b0 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Found-by: Coverity Scan #1323511, #1323512 Reviewed-on: https://review.coreboot.org/17882 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'util/broadcom')
-rw-r--r--util/broadcom/secimage/sbi.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/util/broadcom/secimage/sbi.c b/util/broadcom/secimage/sbi.c
index d972ba4b07..f156ed5946 100644
--- a/util/broadcom/secimage/sbi.c
+++ b/util/broadcom/secimage/sbi.c
@@ -109,6 +109,16 @@ int CreateSecureBootImage(int ac, char **av)
--ac, ++av;
}
+ if (!bl) {
+ puts("-bl not set");
+ return -1;
+ }
+
+ if (!privkey) {
+ puts("-hmac not set");
+ return -1;
+ }
+
if (stat(bl, &file_stat) == -1) {
puts("Can't stat bl");
return -1;