Skip to content

Commit

Permalink
Merge pull request #26 from michael-o/hpux-secure-memory
Browse files Browse the repository at this point in the history
Make secure_zero_memory() compile on HP-UX
  • Loading branch information
veorq authored May 28, 2019
2 parents 2c5142f + 30d45a1 commit 37062e5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/blake2-impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 37062e5

Please sign in to comment.