]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
Using explicit_memset for the explicit_bzero compatibility layer.
authorDavid Carlier <devnexen@gmail.com>
Sat, 21 Nov 2020 12:22:23 +0000 (12:22 +0000)
committerDarren Tucker <dtucker@dtucker.net>
Fri, 5 Feb 2021 06:07:03 +0000 (17:07 +1100)
Favoriting the native implementation in this case.

configure.ac
openbsd-compat/explicit_bzero.c

index 0cd1025f6faca6901b5367c5ba4ce7ca1a4c32f1..63c239e094a12ff3e43e8b2d16f2856837939c2d 100644 (file)
@@ -1805,6 +1805,7 @@ AC_CHECK_FUNCS([ \
        err \
        errx \
        explicit_bzero \
+       explicit_memset \
        fchmod \
        fchmodat \
        fchown \
index 6ef9825a9ad34985ad7eefc1d3ef4ea7e63e199b..68cd2c10b3c8c35eb585b7fe8b0576f80970af13 100644 (file)
 
 #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)