Another occurance of possible valgrind/purify "uninitialized memory"
complaint related to the PRNG: with PURIFY policy don't feed uninitialized memory into the PRNG. Submitted by: Bodo Moeller <bmoeller@openssl.org> :-)
This commit is contained in:
parent
718f8f7a9e
commit
8b99c79fae
@ -129,7 +129,11 @@ int RAND_load_file(const char *file, long bytes)
|
|||||||
i=fread(buf,1,n,in);
|
i=fread(buf,1,n,in);
|
||||||
if (i <= 0) break;
|
if (i <= 0) break;
|
||||||
/* even if n != i, use the full array */
|
/* even if n != i, use the full array */
|
||||||
|
#ifdef PURIFY
|
||||||
|
RAND_add(buf,i,(double)i);
|
||||||
|
#else
|
||||||
RAND_add(buf,n,(double)i);
|
RAND_add(buf,n,(double)i);
|
||||||
|
#endif
|
||||||
ret+=i;
|
ret+=i;
|
||||||
if (bytes > 0)
|
if (bytes > 0)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user