diff options
author | Matt Johnston <matt@ucc.asn.au> | 2017-05-25 22:19:46 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2017-05-25 22:19:46 +0800 |
commit | b17254925ddd82aa633ca8128751b93840fabc9b (patch) | |
tree | 9b146d419535d46cac90d65792e12c9194944e8e /dbhelpers.c | |
parent | cf2c4f44a2476172866f2d460ede18c0ea015968 (diff) |
Just use memset, it should'be be optimised out in a separate file
--HG--
branch : fuzz
Diffstat (limited to 'dbhelpers.c')
-rw-r--r-- | dbhelpers.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/dbhelpers.c b/dbhelpers.c index f7461d9..bb9c2fc 100644 --- a/dbhelpers.c +++ b/dbhelpers.c @@ -9,16 +9,8 @@ void m_burn(void *data, unsigned int len) { #elif defined(HAVE_EXPLICIT_BZERO) explicit_bzero(data, len); #else -/* Based on the method in David Wheeler's - * "Secure Programming for Linux and Unix HOWTO". May not be safe - * against link-time optimisation. */ - volatile char *p = data; - - if (data == NULL) - return; - while (len--) { - *p++ = 0x0; - } + volatile void *p = data; + memset(p, 0x0, len); #endif } |