summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbeck <beck@openbsd.org>2014-06-25 17:04:18 +0000
committerbeck <beck@openbsd.org>2014-06-25 17:04:18 +0000
commit909ecdf62bae261ced1f43a4b96a1e8b5e0796e4 (patch)
tree231be91a23c01d27740b735681e5ddbe7eed304c
parentget the page of data at AT_SYSINFO_EHDR (diff)
downloadwireguard-openbsd-909ecdf62bae261ced1f43a4b96a1e8b5e0796e4.tar.xz
wireguard-openbsd-909ecdf62bae261ced1f43a4b96a1e8b5e0796e4.zip
AT_BASE returns us the *address* of the start of ld.so, so
use the address, not what it points to (which is always the same) ok deraadt@
-rw-r--r--lib/libcrypto/arc4random/getentropy_linux.c4
-rw-r--r--lib/libcrypto/crypto/getentropy_linux.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/libcrypto/arc4random/getentropy_linux.c b/lib/libcrypto/arc4random/getentropy_linux.c
index 2bfff8a0838..17d1094811e 100644
--- a/lib/libcrypto/arc4random/getentropy_linux.c
+++ b/lib/libcrypto/arc4random/getentropy_linux.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: getentropy_linux.c,v 1.12 2014/06/25 16:45:49 beck Exp $ */
+/* $OpenBSD: getentropy_linux.c,v 1.13 2014/06/25 17:04:18 beck Exp $ */
/*
* Copyright (c) 2014 Theo de Raadt <deraadt@openbsd.org>
@@ -465,7 +465,7 @@ getentropy_fallback(void *buf, size_t len)
#ifdef AT_BASE
p = (char *) getauxval(AT_BASE);
if (p)
- HR(p, sizeof(p));
+ HD(p, sizeof(p));
#endif
SHA512_Final(results, &ctx);
diff --git a/lib/libcrypto/crypto/getentropy_linux.c b/lib/libcrypto/crypto/getentropy_linux.c
index 2bfff8a0838..17d1094811e 100644
--- a/lib/libcrypto/crypto/getentropy_linux.c
+++ b/lib/libcrypto/crypto/getentropy_linux.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: getentropy_linux.c,v 1.12 2014/06/25 16:45:49 beck Exp $ */
+/* $OpenBSD: getentropy_linux.c,v 1.13 2014/06/25 17:04:18 beck Exp $ */
/*
* Copyright (c) 2014 Theo de Raadt <deraadt@openbsd.org>
@@ -465,7 +465,7 @@ getentropy_fallback(void *buf, size_t len)
#ifdef AT_BASE
p = (char *) getauxval(AT_BASE);
if (p)
- HR(p, sizeof(p));
+ HD(p, sizeof(p));
#endif
SHA512_Final(results, &ctx);