diff options
Diffstat (limited to 'host/lib/flashrom_drv.c')
-rw-r--r-- | host/lib/flashrom_drv.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/host/lib/flashrom_drv.c b/host/lib/flashrom_drv.c index 026c2c15..19d6384e 100644 --- a/host/lib/flashrom_drv.c +++ b/host/lib/flashrom_drv.c @@ -189,6 +189,9 @@ int flashrom_write_image(const struct firmware_image *image, } } flashrom_layout_set(flashctx, layout); + } else if (image->size != len) { + r = -1; + goto err_cleanup; } flashrom_flag_set(flashctx, FLASHROM_FLAG_VERIFY_WHOLE_CHIP, false); |