diff options
author | basti@linux-source.de <basti@linux-source.de> | 2014-07-21 12:43:13 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2014-07-22 21:39:55 +0200 |
commit | 5b76ec27d1f126304b650ca27dbb93831a19f3b5 (patch) | |
tree | 82a2565453a502e57a20922aa15bef4626ad8266 | |
parent | 54533366d154b1273620decbf8cdb5e39b95e8f8 (diff) | |
download | barebox-5b76ec27d1f126304b650ca27dbb93831a19f3b5.tar.gz barebox-5b76ec27d1f126304b650ca27dbb93831a19f3b5.tar.xz |
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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c index 4896d01976..d9b9111ce1 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; |