From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:6f8:1178:4:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1X9Sn8-0002ZW-Oh for barebox@lists.infradead.org; Tue, 22 Jul 2014 05:39:11 +0000 Date: Tue, 22 Jul 2014 07:38:47 +0200 From: Sascha Hauer Message-ID: <20140722053847.GV23235@pengutronix.de> References: <6b8c916b058b2ea98a40c6d701186608@linux-source.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <6b8c916b058b2ea98a40c6d701186608@linux-source.de> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: Re: [PATCH] arch/arm/lib/bootm: fix length check of kernel image To: basti@linux-source.de Cc: barebox@lists.infradead.org Hi Sebastian, On Mon, Jul 21, 2014 at 12:43:13PM +0200, basti@linux-source.de wrote: > Signed-off-by: Sebastian Block > --- > 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)) { Did this cause any real trouble? I was quite surprised when I saw that patch. After a test I saw that for me 'image_size' has the same value as 'end'. The patch is obviously correct and will be applied, I'm just not sure if it's an important fix or a cleanup change. Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox