[openssh-commits] [openssh] 01/02: Using explicit_memset for the explicit_bzero compatibility layer.
git+noreply at mindrot.org
git+noreply at mindrot.org
Fri Feb 5 17:38:32 AEDT 2021
This is an automated email from the git hooks/post-receive script.
dtucker pushed a commit to branch master
in repository openssh.
commit 1cb6ce98d658e5fbdae025a3bd65793980e3b5d9
Author: David Carlier <devnexen at gmail.com>
Date: Sat Nov 21 12:22:23 2020 +0000
Using explicit_memset for the explicit_bzero compatibility layer.
Favoriting the native implementation in this case.
---
configure.ac | 1 +
openbsd-compat/explicit_bzero.c | 10 +++++++++-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 0cd1025f..63c239e0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1805,6 +1805,7 @@ AC_CHECK_FUNCS([ \
err \
errx \
explicit_bzero \
+ explicit_memset \
fchmod \
fchmodat \
fchown \
diff --git a/openbsd-compat/explicit_bzero.c b/openbsd-compat/explicit_bzero.c
index 6ef9825a..68cd2c10 100644
--- a/openbsd-compat/explicit_bzero.c
+++ b/openbsd-compat/explicit_bzero.c
@@ -15,7 +15,15 @@
#ifndef HAVE_EXPLICIT_BZERO
-#ifdef HAVE_MEMSET_S
+#ifdef HAVE_EXPLICIT_MEMSET
+
+void
+explicit_bzero(void *p, size_t n)
+{
+ (void)explicit_memset(p, 0, n);
+}
+
+#elif defined(HAVE_MEMSET_S)
void
explicit_bzero(void *p, size_t n)
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list