libc/newlib/libc/string/explicit_bzero.c
Sebastian Huber 8740fa7fd0 Add explicit_bzero()
This function is used by LibreSSL and OpenSSH and is provided by the
OpenBSD libc.

	* libc/include/string.h (explicit_bzero): Declare.
	* libc/string/explicit_bzero.c: New file.
	* libc/string/Makefile.am: Add new file.
	* libc/string/Makefile.in: Regenerate.
2016-03-18 12:33:40 +01:00

17 lines
273 B
C

/* $OpenBSD: explicit_bzero.c,v 1.2 2014/06/10 04:17:37 deraadt Exp $ */
/*
* Public domain.
* Written by Ted Unangst
*/
#include <string.h>
/*
* explicit_bzero - don't let the compiler optimize away bzero
*/
void
explicit_bzero(void *p, size_t n)
{
bzero(p, n);
}