summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbeck <>2014-06-25 17:04:18 +0000
committerbeck <>2014-06-25 17:04:18 +0000
commitb7117f864837a8b70cb7c3b889b47eeeeff1c464 (patch)
tree357da061ebee2efafd85e6c7d9edef8a095448e3 /src
parentb00d78df3e76cffa9c2c469d6ec8d3f0d91e67f9 (diff)
downloadopenbsd-b7117f864837a8b70cb7c3b889b47eeeeff1c464.tar.gz
openbsd-b7117f864837a8b70cb7c3b889b47eeeeff1c464.tar.bz2
openbsd-b7117f864837a8b70cb7c3b889b47eeeeff1c464.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@
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/arc4random/getentropy_linux.c4
-rw-r--r--src/lib/libcrypto/crypto/getentropy_linux.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/libcrypto/arc4random/getentropy_linux.c b/src/lib/libcrypto/arc4random/getentropy_linux.c
index 2bfff8a083..17d1094811 100644
--- a/src/lib/libcrypto/arc4random/getentropy_linux.c
+++ b/src/lib/libcrypto/arc4random/getentropy_linux.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: getentropy_linux.c,v 1.12 2014/06/25 16:45:49 beck Exp $ */ 1/* $OpenBSD: getentropy_linux.c,v 1.13 2014/06/25 17:04:18 beck Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2014 Theo de Raadt <deraadt@openbsd.org> 4 * Copyright (c) 2014 Theo de Raadt <deraadt@openbsd.org>
@@ -465,7 +465,7 @@ getentropy_fallback(void *buf, size_t len)
465#ifdef AT_BASE 465#ifdef AT_BASE
466 p = (char *) getauxval(AT_BASE); 466 p = (char *) getauxval(AT_BASE);
467 if (p) 467 if (p)
468 HR(p, sizeof(p)); 468 HD(p, sizeof(p));
469#endif 469#endif
470 470
471 SHA512_Final(results, &ctx); 471 SHA512_Final(results, &ctx);
diff --git a/src/lib/libcrypto/crypto/getentropy_linux.c b/src/lib/libcrypto/crypto/getentropy_linux.c
index 2bfff8a083..17d1094811 100644
--- a/src/lib/libcrypto/crypto/getentropy_linux.c
+++ b/src/lib/libcrypto/crypto/getentropy_linux.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: getentropy_linux.c,v 1.12 2014/06/25 16:45:49 beck Exp $ */ 1/* $OpenBSD: getentropy_linux.c,v 1.13 2014/06/25 17:04:18 beck Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2014 Theo de Raadt <deraadt@openbsd.org> 4 * Copyright (c) 2014 Theo de Raadt <deraadt@openbsd.org>
@@ -465,7 +465,7 @@ getentropy_fallback(void *buf, size_t len)
465#ifdef AT_BASE 465#ifdef AT_BASE
466 p = (char *) getauxval(AT_BASE); 466 p = (char *) getauxval(AT_BASE);
467 if (p) 467 if (p)
468 HR(p, sizeof(p)); 468 HD(p, sizeof(p));
469#endif 469#endif
470 470
471 SHA512_Final(results, &ctx); 471 SHA512_Final(results, &ctx);