diff options
author | Stephan Mueller <smueller@chronox.de> | 2015-03-13 11:44:07 +0100 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2015-03-16 21:46:25 +1100 |
commit | 2ef4d5c43de945b7c78454eac63e5f4fe68f82fc (patch) | |
tree | ebd4bdc15349ccc3f9cf27ba8edeed24fb5e4c4b /crypto/algif_rng.c | |
parent | 5986ac4fcb451160acdc8bf3a0b81ac9a72b3251 (diff) | |
download | linux-stable-2ef4d5c43de945b7c78454eac63e5f4fe68f82fc.tar.gz linux-stable-2ef4d5c43de945b7c78454eac63e5f4fe68f82fc.tar.bz2 linux-stable-2ef4d5c43de945b7c78454eac63e5f4fe68f82fc.zip |
crypto: algif_rng - zeroize buffer with random data
Due to the change to RNGs to always return zero in success case, the RNG
interface must zeroize the buffer with the length provided by the
caller.
Signed-off-by: Stephan Mueller <smueller@chronox.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/algif_rng.c')
-rw-r--r-- | crypto/algif_rng.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/algif_rng.c b/crypto/algif_rng.c index 67f612cfed97..a34617359cd9 100644 --- a/crypto/algif_rng.c +++ b/crypto/algif_rng.c @@ -87,7 +87,7 @@ static int rng_recvmsg(struct kiocb *unused, struct socket *sock, return genlen; err = memcpy_to_msg(msg, result, len); - memzero_explicit(result, genlen); + memzero_explicit(result, len); return err ? err : len; } |