From 0abb6899d8b2cdcc71c1f7f3e41f53c12a285e0f Mon Sep 17 00:00:00 2001 From: jsg Date: Mon, 4 May 2015 09:38:05 +0000 Subject: [PATCH] use the size of the buffer not the pointer in resume_randomness() ok djm@ miod@ deraadt@ --- sys/dev/rnd.c | 4 ++-- 1 file 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); -- 2.20.1