diff options
author | Damien Miller <djm@mindrot.org> | 2014-02-04 11:18:20 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2014-02-04 11:18:20 +1100 |
commit | 1d2c4564265ee827147af246a16f3777741411ed (patch) | |
tree | af83ab151453d013118cd1bd20fb8ba887665fed /openbsd-compat/explicit_bzero.c | |
parent | 3928de067c286683a95fbdbdb5fdb3c78a0e5efd (diff) |
- tedu@cvs.openbsd.org 2014/01/31 16:39:19
[auth2-chall.c authfd.c authfile.c bufaux.c bufec.c canohost.c]
[channels.c cipher-chachapoly.c clientloop.c configure.ac hostfile.c]
[kexc25519.c krl.c monitor.c sandbox-systrace.c session.c]
[sftp-client.c ssh-keygen.c ssh.c sshconnect2.c sshd.c sshlogin.c]
[openbsd-compat/explicit_bzero.c openbsd-compat/openbsd-compat.h]
replace most bzero with explicit_bzero, except a few that cna be memset
ok djm dtucker
Diffstat (limited to 'openbsd-compat/explicit_bzero.c')
-rw-r--r-- | openbsd-compat/explicit_bzero.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/openbsd-compat/explicit_bzero.c b/openbsd-compat/explicit_bzero.c new file mode 100644 index 000000000..b106741e5 --- /dev/null +++ b/openbsd-compat/explicit_bzero.c | |||
@@ -0,0 +1,20 @@ | |||
1 | /* OPENBSD ORIGINAL: lib/libc/string/explicit_bzero.c */ | ||
2 | /* $OpenBSD: explicit_bzero.c,v 1.1 2014/01/22 21:06:45 tedu Exp $ */ | ||
3 | /* | ||
4 | * Public domain. | ||
5 | * Written by Ted Unangst | ||
6 | */ | ||
7 | |||
8 | #include "includes.h" | ||
9 | |||
10 | #ifndef HAVE_EXPLICIT_BZERO | ||
11 | |||
12 | /* | ||
13 | * explicit_bzero - don't let the compiler optimize away bzero | ||
14 | */ | ||
15 | void | ||
16 | explicit_bzero(void *p, size_t n) | ||
17 | { | ||
18 | bzero(p, n); | ||
19 | } | ||
20 | #endif | ||