[prev in list] [next in list] [prev in thread] [next in thread]
List: kernel-janitors
Subject: Re: [patch] crypto: caam - ARRAY_SIZE() vs sizeof()
From: Herbert Xu <herbert () gondor ! hengli ! com ! au>
Date: 2011-03-23 13:22:19
Message-ID: 20110323132219.GC4374 () gondor ! apana ! org ! au
[Download RAW message or body]
On Tue, Mar 15, 2011 at 05:20:37PM -0500, Kim Phillips wrote:
> On Tue, 15 Mar 2011 09:59:55 +0300
> Dan Carpenter <error27@gmail.com> wrote:
>
> > ARRAY_SIZE() was intended here instead of sizeof(). sizeof() is four
> > times larger than ARRAY_SIZE(). outstr is normally 256 chars so
> > printing garbage to it could overfill the buffer and corrupt memory.
> >
> > Signed-off-by: Dan Carpenter <error27@gmail.com>
>
> Acked-by: Kim Phillips <kim.phillips@freescale.com>
Also applied. Thanks!
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic