Fix reseeding issues of the public RAND_DRBG
[openssl.git] / test / drbgtest.c
index 7d33c3035d1df78597aef26d34832b15c1f64090..25920d6e40af01368976926a8f7dae3c7d70d184 100644 (file)
@@ -481,7 +481,7 @@ static int test_rand_add(void)
 {
     char *p;
 
-    if (!TEST_ptr(p = malloc(RAND_ADD_SIZE)))
+    if (!TEST_ptr(p = calloc(RAND_ADD_SIZE, 1)))
         return 0;
     RAND_add(p, RAND_ADD_SIZE, RAND_ADD_SIZE);
     free(p);