summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbasti@linux-source.de <basti@linux-source.de>2014-07-21 12:43:13 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2014-07-22 21:45:53 +0200
commita3abbad9be8f238aeea5a082bd5538d22afae834 (patch)
treecf2dd7b3aa94d01ceb40dd5529f80551ba9f953a
parentd9cebd6dee36abcc5fa8f1b7a5e25f0ef88f8fa4 (diff)
downloadbarebox-a3abbad9be8f238aeea5a082bd5538d22afae834.tar.gz
arch/arm/lib/bootm: fix length check of kernel image
Signed-off-by: Sebastian Block <basti@linux-source.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--arch/arm/lib/bootm.c2
1 files changed, 1 insertions, 1 deletions
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 @@ 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;