diff options
author | nicoo <nicoo@debian.org> | 2020-02-12 13:43:18 +0100 |
---|---|---|
committer | Nicolas Braud-Santoni <nicolas@braud-santoni.eu> | 2020-02-12 13:43:18 +0100 |
commit | 88a8bdd35ca7fb0c1ce70abdd8262d958fedafc1 (patch) | |
tree | ce42d9d46d371c05eed82d8bb1e8aa7b2522a769 /openbsd-compat/explicit_bzero_win32.c | |
parent | 4e06e4554b69e678110563b1cf00a258a202dd7b (diff) | |
parent | c79050aa44b8836d836c5dd22a383a073c28b74b (diff) |
Merge upstream release 1.3.0 into debian/sid
Diffstat (limited to 'openbsd-compat/explicit_bzero_win32.c')
-rw-r--r-- | openbsd-compat/explicit_bzero_win32.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/openbsd-compat/explicit_bzero_win32.c b/openbsd-compat/explicit_bzero_win32.c new file mode 100644 index 0000000..8017aff --- /dev/null +++ b/openbsd-compat/explicit_bzero_win32.c | |||
@@ -0,0 +1,19 @@ | |||
1 | /* | ||
2 | * Public domain. | ||
3 | * Win32 explicit_bzero compatibility shim. | ||
4 | */ | ||
5 | |||
6 | #include "openbsd-compat.h" | ||
7 | |||
8 | #if !defined(HAVE_EXPLICIT_BZERO) && defined(_WIN32) | ||
9 | |||
10 | #include <windows.h> | ||
11 | #include <string.h> | ||
12 | |||
13 | void | ||
14 | explicit_bzero(void *buf, size_t len) | ||
15 | { | ||
16 | SecureZeroMemory(buf, len); | ||
17 | } | ||
18 | |||
19 | #endif /* !defined(HAVE_EXPLICIT_BZERO) && defined(_WIN32) */ | ||