diff options
-rw-r--r-- | util/broadcom/secimage/io.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/util/broadcom/secimage/io.c b/util/broadcom/secimage/io.c index d71065c9c4..f5be50afc7 100644 --- a/util/broadcom/secimage/io.c +++ b/util/broadcom/secimage/io.c @@ -73,6 +73,11 @@ 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); + fclose(file); + return -1; + } if (len < *length) *length = len; else |