1) Set stired flag after forced initialization.

2) Increase arc4_count to the limit OpenBSD use.

Submitted by:   Thorsten Glaser <tg@mirbsd.de> (1)
Obtained from:  OpenBSD (2)
This commit is contained in:
Andrey A. Chernov 2008-07-21 10:31:28 +00:00
parent dc5aa2110e
commit 0761bd1fe1

View File

@ -124,7 +124,7 @@ arc4_stir(struct arc4_stream *as)
*/
for (n = 0; n < 1024; n++)
(void) arc4_getbyte(as);
arc4_count = 400000;
arc4_count = 1600000;
}
static inline u_int8_t
@ -179,6 +179,7 @@ arc4random_stir(void)
THREAD_LOCK();
arc4_check_init();
arc4_stir(&rs);
rs_stired = 1;
THREAD_UNLOCK();
}