diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2007-09-19 13:29:05 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2007-09-19 13:29:05 +0000 |
commit | 625782f7eeb0e7c9fef676feb70a369978a93018 (patch) | |
tree | da8aa0ba2b9ecd0c6ec2a8aa439057fafaf2bd2b | |
parent | 1c90899eef5ce012b9dcc5697d28e30b57ed208d (diff) |
Wrap "keep valgrind happy" change in #ifdef PEDANTIC so any entropy in the
buffer can be normally used.
-rw-r--r-- | crypto/rand/rand_lib.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crypto/rand/rand_lib.c b/crypto/rand/rand_lib.c index adfec83b7b..b615696e97 100644 --- a/crypto/rand/rand_lib.c +++ b/crypto/rand/rand_lib.c @@ -154,7 +154,9 @@ void RAND_add(const void *buf, int num, double entropy) int RAND_bytes(unsigned char *buf, int num) { const RAND_METHOD *meth = RAND_get_rand_method(); +#ifdef PEDANTIC memset(buf, 0, num); +#endif if (meth && meth->bytes) return meth->bytes(buf,num); return(-1); @@ -163,7 +165,9 @@ int RAND_bytes(unsigned char *buf, int num) int RAND_pseudo_bytes(unsigned char *buf, int num) { const RAND_METHOD *meth = RAND_get_rand_method(); +#ifdef PEDANTIC memset(buf, 0, num); +#endif if (meth && meth->pseudorand) return meth->pseudorand(buf,num); return(-1); |