diff options
author | nicoo <nicoo@debian.org> | 2020-02-12 13:42:22 +0100 |
---|---|---|
committer | Nicolas Braud-Santoni <nicolas@braud-santoni.eu> | 2020-02-12 13:42:22 +0100 |
commit | c79050aa44b8836d836c5dd22a383a073c28b74b (patch) | |
tree | 7bcca9fabd7718bf87ca600a6594f57b76d8de7d /openbsd-compat/explicit_bzero_win32.c |
Import upstream release 1.3.0
Closes: #951184
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) */ | ||