From 30d45a17c59dc7dbf853da3085b71d466275bd0a Mon Sep 17 00:00:00 2001 From: Michael Osipov Date: Tue, 28 May 2019 15:48:17 +0200 Subject: [PATCH] Make secure_zero_memory() compile on HP-UX This reinstantiates the portable approach to this function dropped in b4b241a34824b51956a7866606329a065d397525. HP-UX does not have any of the fancy secure/explicit functions and the compiler does not support the inline assembly syntax. --- src/blake2-impl.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/blake2-impl.h b/src/blake2-impl.h index 801f1ae..115e66e 100644 --- a/src/blake2-impl.h +++ b/src/blake2-impl.h @@ -141,6 +141,9 @@ static inline void secure_zero_memory(void *v, size_t n) { #if defined(_WIN32) || defined(WIN32) SecureZeroMemory(v, n); +#elif defined(__hpux) + static void *(*const volatile memset_v)(void *, int, size_t) = &memset; + memset_v(v, 0, n); #else // prioritize first the general C11 call #if defined(HAVE_MEMSET_S)