Created
July 31, 2014 14:06
-
-
Save jiixyj/139d471fc76517484738 to your computer and use it in GitHub Desktop.
Patch for explicit_bzero
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- 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