From: Ulrich Drepper Date: Sun, 26 Mar 2000 18:15:40 +0000 (+0000) Subject: (__setstate_r): Allow RNGs of type 4. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=954ec632ba3613e5ef180955783fa30210cd8f31;p=thirdparty%2Fglibc.git (__setstate_r): Allow RNGs of type 4. --- diff --git a/stdlib/random_r.c b/stdlib/random_r.c index 445bc95d359..19edf2a2d00 100644 --- a/stdlib/random_r.c +++ b/stdlib/random_r.c @@ -285,7 +285,7 @@ __setstate_r (arg_state, buf) old_state[-1] = (MAX_TYPES * (buf->rptr - old_state)) + old_type; type = new_state[0] % MAX_TYPES; - if (type < TYPE_0 || type >= TYPE_4) + if (type < TYPE_0 || type > TYPE_4) goto fail; buf->rand_deg = degree = random_poly_info.degrees[type];