summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--util/broadcom/secimage/sbi.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/util/broadcom/secimage/sbi.c b/util/broadcom/secimage/sbi.c
index 8718f14d34..d972ba4b07 100644
--- a/util/broadcom/secimage/sbi.c
+++ b/util/broadcom/secimage/sbi.c
@@ -109,7 +109,10 @@ int CreateSecureBootImage(int ac, char **av)
--ac, ++av;
}
- stat(bl, &file_stat);
+ if (stat(bl, &file_stat) == -1) {
+ puts("Can't stat bl");
+ return -1;
+ }
filesize = file_stat.st_size + MIN_SIZE;
buf = calloc(sizeof(uint8_t), filesize);