explicit_bzero.c 331 B

1234567891011121314151617181920
  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. #include <string.h>
  7. __attribute__((weak)) void
  8. __explicit_bzero_hook(void *buf, size_t len)
  9. {
  10. }
  11. void
  12. explicit_bzero(void *buf, size_t len)
  13. {
  14. memset(buf, 0, len);
  15. __explicit_bzero_hook(buf, len);
  16. }