diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2015-05-04 09:38:06 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2015-05-04 09:38:06 +0000 |
commit | b497ceba0b5809a04676d4bca52087e2de3cc1f7 (patch) | |
tree | ce15b6faf76b61d7a6eacce67b0313ab72e7f134 /sys | |
parent | b9fbec7c344af6713f8d9f68cd22197064bd5dfa (diff) |
use the size of the buffer not the pointer in resume_randomness()
ok djm@ miod@ deraadt@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/rnd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/rnd.c b/sys/dev/rnd.c index 9074bd52569..970b3be5d3a 100644 --- a/sys/dev/rnd.c +++ b/sys/dev/rnd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rnd.c,v 1.173 2015/03/14 03:38:46 jsg Exp $ */ +/* $OpenBSD: rnd.c,v 1.174 2015/05/04 09:38:05 jsg Exp $ */ /* * Copyright (c) 2011 Theo de Raadt. @@ -553,7 +553,7 @@ resume_randomness(char *buf, size_t buflen) struct timespec ts; if (buf && buflen) - _rs_seed(buf, sizeof(buf)); + _rs_seed(buf, buflen); getnanotime(&ts); add_true_randomness(ts.tv_sec); add_true_randomness(ts.tv_nsec); |