projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0c27ce7
)
rand_unix.c: Ensure requests to KERN_ARND don't exceed 256 bytes.
author
nia
<nia@netbsd.org>
Thu, 30 Apr 2020 13:43:04 +0000
(14:43 +0100)
committer
Matt Caswell
<matt@openssl.org>
Mon, 4 May 2020 07:55:47 +0000
(08:55 +0100)
Requests for more than 256 bytes will fail.
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/11689)
crypto/rand/rand_unix.c
patch
|
blob
|
history
diff --git
a/crypto/rand/rand_unix.c
b/crypto/rand/rand_unix.c
index c9ee01f1b13844a1e82c0b4125faa25f11109b1f..081ffca908bd486145cabffa64f3caa5f794c97a 100644
(file)
--- a/
crypto/rand/rand_unix.c
+++ b/
crypto/rand/rand_unix.c
@@
-250,7
+250,7
@@
static ssize_t sysctl_random(char *buf, size_t buflen)
mib[1] = KERN_ARND;
do {
- len = buflen;
+ len = buflen
> 256 ? 256 : buflen
;
if (sysctl(mib, 2, buf, &len, NULL, 0) == -1)
return done > 0 ? done : -1;
done += len;