Loading crypto/rand/randfile.c +8 −0 Original line number Diff line number Diff line Loading @@ -118,6 +118,14 @@ int RAND_load_file(const char *file, long bytes) if (file == NULL) return(0); #ifndef OPENSSL_NO_POSIX_IO #ifdef PURIFY /* struct stat can have padding and unused fields that may not be * initialized in the call to stat(). We need to clear the entire * structure before calling RAND_add() to avoid complaints from * applications such as Valgrind. */ memset(&sb, 0, sizeof(sb)); #endif if (stat(file,&sb) < 0) return(0); RAND_add(&sb,sizeof(sb),0.0); #endif Loading Loading
crypto/rand/randfile.c +8 −0 Original line number Diff line number Diff line Loading @@ -118,6 +118,14 @@ int RAND_load_file(const char *file, long bytes) if (file == NULL) return(0); #ifndef OPENSSL_NO_POSIX_IO #ifdef PURIFY /* struct stat can have padding and unused fields that may not be * initialized in the call to stat(). We need to clear the entire * structure before calling RAND_add() to avoid complaints from * applications such as Valgrind. */ memset(&sb, 0, sizeof(sb)); #endif if (stat(file,&sb) < 0) return(0); RAND_add(&sb,sizeof(sb),0.0); #endif Loading