Re: [PATCH] crypto: skcipher - remove unnecessary setting of walk->nbytes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 23, 2018 at 10:21:29AM -0700, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@xxxxxxxxxx>
> 
> Setting 'walk->nbytes = walk->total' in skcipher_walk_first() doesn't
> make sense because actually walk->nbytes needs to be set to the length
> of the first step in the walk, which may be less than walk->total.  This
> is done by skcipher_walk_next() which is called immediately afterwards.
> Also walk->nbytes was already set to 0 in skcipher_walk_skcipher(),
> which is a better default value in case it's forgotten to be set later.
> 
> Therefore, remove the unnecessary assignment to walk->nbytes.
> 
> Signed-off-by: Eric Biggers <ebiggers@xxxxxxxxxx>

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt



[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux