vfs: check userland buffers before reading them.
[haiku.git] / src / libs / bsd / explicit_bzero.c
blob359e4d41bfc1d3236086c308e56bcc63408281be
1 /* $OpenBSD: explicit_bzero.c,v 1.3 2014/06/21 02:34:26 matthew Exp $ */
2 /*
3 * Public domain.
4 * Written by Matthew Dempsky.
5 */
7 #include <string.h>
9 __attribute__((weak)) void
10 __explicit_bzero_hook(void *buf, size_t len);
12 __attribute__((weak)) void
13 __explicit_bzero_hook(void *buf, size_t len)
17 void
18 explicit_bzero(void *buf, size_t len)
20 memset(buf, 0, len);
21 __explicit_bzero_hook(buf, len);