Thread (3 messages) read the whole thread 3 messages, 3 authors, 2011-03-23

Re: [patch] crypto: caam - ARRAY_SIZE() vs sizeof()

From: Herbert Xu <herbert@gondor.apana.org.au>
Date: 2011-03-23 13:22:28
Also in: kernel-janitors

On Tue, Mar 15, 2011 at 05:20:37PM -0500, Kim Phillips wrote:
On Tue, 15 Mar 2011 09:59:55 +0300
Dan Carpenter [off-list ref] wrote:
quoted
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 <redacted>
Acked-by: Kim Phillips <redacted>
Also applied.  Thanks!
-- 
Email: Herbert Xu [off-list ref]
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help