summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorStephan Mueller <smueller@chronox.de>2015-03-13 11:44:07 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2015-03-16 21:46:25 +1100
commit2ef4d5c43de945b7c78454eac63e5f4fe68f82fc (patch)
treeebd4bdc15349ccc3f9cf27ba8edeed24fb5e4c4b /crypto
parent5986ac4fcb451160acdc8bf3a0b81ac9a72b3251 (diff)
downloadlinux-2ef4d5c43de945b7c78454eac63e5f4fe68f82fc.tar.bz2
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')
-rw-r--r--crypto/algif_rng.c2
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;
}