diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2001-09-23 10:16:28 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2001-09-23 10:16:28 +0000 |
commit | 4518752a69ed90bfa748ccb9197b03f639b7099f (patch) | |
tree | 97842e35ce3fbabf64f69348db40a0c690ddc027 /sys | |
parent | 20ff25616571703e0e266d9abb4df429a80fb92b (diff) |
oops, fix the after folding sizes
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/rnd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/rnd.c b/sys/dev/rnd.c index df21ca1f2b3..672d093fcb3 100644 --- a/sys/dev/rnd.c +++ b/sys/dev/rnd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rnd.c,v 1.48 2001/06/24 20:52:05 mickey Exp $ */ +/* $OpenBSD: rnd.c,v 1.49 2001/09/23 10:16:27 mickey Exp $ */ /* * random.c -- A strong random number generator @@ -862,7 +862,7 @@ extract_entropy(buf, nbytes) while (nbytes) { register u_char *p = buf; - register int i = sizeof(buffer); + register int i = sizeof(buffer)/2; if (i > nbytes) { i = nbytes; @@ -888,10 +888,10 @@ extract_entropy(buf, nbytes) p[7] ^= p[ 8]; /* Modify pool so next hash will produce different results */ - add_entropy_words((u_int32_t*)p, sizeof(buffer)/4); + add_entropy_words((u_int32_t*)p, sizeof(buffer)/8); /* Copy data to destination buffer */ - if (i < sizeof(buffer)) + if (i < sizeof(buffer)/2) bcopy(buffer, buf, i); nbytes -= i; buf += i; |