artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
627a010
)
use the size of the buffer not the pointer in resume_randomness()
author
jsg
<jsg@openbsd.org>
Mon, 4 May 2015 09:38:05 +0000
(09:38 +0000)
committer
jsg
<jsg@openbsd.org>
Mon, 4 May 2015 09:38:05 +0000
(09:38 +0000)
ok djm@ miod@ deraadt@
sys/dev/rnd.c
patch
|
blob
|
history
diff --git
a/sys/dev/rnd.c
b/sys/dev/rnd.c
index
9074bd5
..
970b3be
100644
(file)
--- a/
sys/dev/rnd.c
+++ b/
sys/dev/rnd.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: rnd.c,v 1.17
3 2015/03/14 03:38:46
jsg Exp $ */
+/* $OpenBSD: rnd.c,v 1.17
4 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);