Skip to content

Instantly share code, notes, and snippets.

@jiixyj
Created July 31, 2014 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jiixyj/139d471fc76517484738 to your computer and use it in GitHub Desktop.
Save jiixyj/139d471fc76517484738 to your computer and use it in GitHub Desktop.
Patch for explicit_bzero
--- lib/libc/string/explicit_bzero.c 2014-07-18 11:19:05.766268531 +0200
+++ lib/libc/string/explicit_bzero.c 2014-07-18 11:19:29.821267650 +0200
@@ -7,13 +7,12 @@
#include <string.h>
__attribute__((weak)) void
-__explicit_bzero_hook(void *buf, size_t len)
-{
-}
+__explicit_bzero_hook(void *buf, size_t len);
void
explicit_bzero(void *buf, size_t len)
{
memset(buf, 0, len);
- __explicit_bzero_hook(buf, len);
+ if (__explicit_bzero_hook)
+ __explicit_bzero_hook(buf, len);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment