mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Lucas Stach <l.stach@pengutronix.de>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] arch/arm/lib/bootm: fix length check of kernel image
Date: Tue, 22 Jul 2014 09:38:44 +0200	[thread overview]
Message-ID: <1406014724.4667.1.camel@weser.hi.pengutronix.de> (raw)
In-Reply-To: <20140722053847.GV23235@pengutronix.de>

Am Dienstag, den 22.07.2014, 07:38 +0200 schrieb Sascha Hauer:
> Hi Sebastian,
> 
> On Mon, Jul 21, 2014 at 12:43:13PM +0200, basti@linux-source.de wrote:
> > 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)) {
> 
> 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.
> 
I don't think this qualifies as a critical fix, as before the
introduction of this 'image_size' variable we always used 'end' as the
size of the image without running into any problems. So I think this is
only a correctness fix.

Regards,
Lucas

-- 
Pengutronix e.K.             | Lucas Stach                 |
Industrial Linux Solutions   | http://www.pengutronix.de/  |


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

  reply	other threads:[~2014-07-22  7:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-21 10:43 basti
2014-07-22  5:38 ` Sascha Hauer
2014-07-22  7:38   ` Lucas Stach [this message]
     [not found]   ` <94dc023fe4dffc56144a4d26532aff05@linux-source.de>
2014-07-22 19:45     ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1406014724.4667.1.camel@weser.hi.pengutronix.de \
    --to=l.stach@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox