diff options
Diffstat (limited to 'util')
-rw-r--r-- | util/cbfstool/fit.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/util/cbfstool/fit.c b/util/cbfstool/fit.c index 89b0fd28d9..7f8218a745 100644 --- a/util/cbfstool/fit.c +++ b/util/cbfstool/fit.c @@ -297,7 +297,8 @@ parse_microcode_blob(struct cbfs_image *image, uint32_t total_size = mcu_header->total_size ?: 2048; /* Quickly sanity check a prospective microcode update. */ - if (total_size < sizeof(*mcu_header)) + if (total_size < sizeof(*mcu_header) || + total_size > file_length) break; /* FIXME: Should the checksum be validated? */ |