mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Alexander Aring <alex.aring@gmail.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 5/7] sha2: fix invalid length check
Date: Tue, 21 Oct 2014 13:09:31 +0200	[thread overview]
Message-ID: <20141021110931.GO14443@pengutronix.de> (raw)
In-Reply-To: <20141020210647.GA1676@omega>

On Mon, Oct 20, 2014 at 11:06:49PM +0200, Alexander Aring wrote:
> Hi Lucas,
> 
> On Mon, Oct 20, 2014 at 08:15:59PM +0200, Lucas Stach wrote:
> > length is unsigned an thus can never be <0.
> > 
> > Signed-off-by: Lucas Stach <dev@lynxeye.de>
> > ---
> >  crypto/sha2.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/crypto/sha2.c b/crypto/sha2.c
> > index 26162e8..e495313 100644
> > --- a/crypto/sha2.c
> > +++ b/crypto/sha2.c
> > @@ -208,7 +208,7 @@ static void sha2_update(sha2_context * ctx, const uint8_t * input, size_t length
> >  	size_t fill;
> >  	uint32_t left;
> >  
> > -	if (length <= 0)
> > +	if (length = 0)
> 
> should be (length == 0).

Fixed while applying.

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

  reply	other threads:[~2014-10-21 11:09 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-20 18:15 [PATCH 1/7] imx: ipu-v3: fix typo leading to build warning Lucas Stach
2014-10-20 18:15 ` [PATCH 2/7] dfu: fix possible usage of uninitialized var Lucas Stach
2014-10-20 18:15 ` [PATCH 3/7] arm: boards: variscite-mx6: check i2c return value Lucas Stach
2014-10-20 18:15 ` [PATCH 4/7] arm: at91: remove unused variable Lucas Stach
2014-10-21  1:56   ` Bo Shen
2014-10-20 18:15 ` [PATCH 5/7] sha2: fix invalid length check Lucas Stach
2014-10-20 21:06   ` Alexander Aring
2014-10-21 11:09     ` Sascha Hauer [this message]
2014-10-20 18:16 ` [PATCH 6/7] i2c: at91: " Lucas Stach
2014-10-21  2:01   ` Bo Shen
2014-10-20 18:16 ` [PATCH 7/7] clk: gate: remove superfluous code Lucas Stach
2014-10-21 11:09 ` [PATCH 1/7] imx: ipu-v3: fix typo leading to build warning 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=20141021110931.GO14443@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=alex.aring@gmail.com \
    --cc=barebox@lists.infradead.org \
    /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