Make rand_add predictable when fuzzing
[oweals/openssl.git] / crypto / rand / md_rand.c
index 88820bbb917674e18644d308d862c6ec30d612e2..78da14a8e602717a60792d777bf2aab2f6d18f6a 100644 (file)
@@ -126,6 +126,11 @@ static int rand_add(const void *buf, int num, double add)
     if (!num)
         return 1;
 
+#ifdef PREDICT
+    if (rand_predictable)
+        return 1;
+#endif
+
     /*
      * (Based on the rand(3) manpage)
      *