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:46:03 +0200
commitb8fa109b252797e458f35ab7f5525a8a2332a6d5 (patch)
tree6aa2059a64284898ba5d5ad1550f5c48390a2791
parent950c75d1e995b6730625be0c2e310d88693333fd (diff)
downloadbarebox-b8fa109b252797e458f35ab7f5525a8a2332a6d5.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;