mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] arch/arm/lib/bootm: fix length check of kernel image
@ 2014-07-21 10:43 basti
  2014-07-22  5:38 ` Sascha Hauer
  0 siblings, 1 reply; 4+ messages in thread
From: basti @ 2014-07-21 10:43 UTC (permalink / raw)
  To: barebox

Signed-off-by: Sebastian Block <basti@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


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-07-22 19:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-21 10:43 [PATCH] arch/arm/lib/bootm: fix length check of kernel image basti
2014-07-22  5:38 ` Sascha Hauer
2014-07-22  7:38   ` Lucas Stach
     [not found]   ` <94dc023fe4dffc56144a4d26532aff05@linux-source.de>
2014-07-22 19:45     ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox