[PATCH] arch/arm/lib/bootm: fix length check of kernel image
basti at linux-source.de
basti at linux-source.de
Mon Jul 21 03:43:13 PDT 2014
Signed-off-by: Sebastian Block <basti at linux-source.de>
---
arch/arm/lib/bootm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
index 4896d01..d9b9111 100644
--- a/arch/arm/lib/bootm.c
+++ b/arch/arm/lib/bootm.c
@@ -314,7 +314,7 @@ static int do_bootz_linux(struct image_data *data)
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;
--
1.7.10.4
More information about the barebox
mailing list