Commit 68f4237c authored by Kurt Roeckx's avatar Kurt Roeckx
Browse files

Make rand_add predictable when fuzzing



Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
GH: #2182
parent d2aa960e
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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)
     *