diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c index 8035468..1d487b9 100644 --- a/arch/arm/lib/bootm.c +++ b/arch/arm/lib/bootm.c @@ -314,7 +314,7 @@ image_size - sizeof(*header)); if (ret < 0) goto err_out; - if (ret < end - sizeof(*header)) { + if (ret < image_size - sizeof(*header)) { printf("premature end of image\n"); ret = -EIO; goto err_out;