X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb/blobdiff_plain/ffb29736d0a30a22cc3214779a953ac38079c4d8..0b38b8b77ca6eef0006b1051f86df440fe5ab8dd:/rand/noise.c diff --git a/rand/noise.c b/rand/noise.c index 280c49cb..c120e6f2 100644 --- a/rand/noise.c +++ b/rand/noise.c @@ -217,7 +217,7 @@ int noise_devrandom(rand_pool *r) /* --- OpenBSD-flavoured shinies --- */ while (n < sizeof(buf)) { - nn = sizeof(buf) - nn; + nn = sizeof(buf) - n; if (nn > 256) nn = 256; if (getentropy(buf + n, nn)) break; n += nn;