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 */ 6 7#include <string.h> 8 9__attribute__((weak)) void 10__explicit_bzero_hook(void *buf, size_t len); 11 12__attribute__((weak)) void 13__explicit_bzero_hook(void *buf, size_t len) 14{ 15} 16 17void 18explicit_bzero(void *buf, size_t len) 19{ 20 memset(buf, 0, len); 21 __explicit_bzero_hook(buf, len); 22} 23