projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1c90899
)
Wrap "keep valgrind happy" change in #ifdef PEDANTIC so any entropy in the
author
Dr. Stephen Henson
<steve@openssl.org>
Wed, 19 Sep 2007 13:29:05 +0000
(13:29 +0000)
committer
Dr. Stephen Henson
<steve@openssl.org>
Wed, 19 Sep 2007 13:29:05 +0000
(13:29 +0000)
buffer can be normally used.
crypto/rand/rand_lib.c
patch
|
blob
|
history
diff --git
a/crypto/rand/rand_lib.c
b/crypto/rand/rand_lib.c
index adfec83b7bd88ff3ebe4f62edc18b9ff3076862a..b615696e97ddbedba64ad67321c42a3e30d70753 100644
(file)
--- 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);