Just use memset, it should'be be optimised out in a separate file

--HG--
branch : fuzz
This commit is contained in:
Matt Johnston 2017-05-25 22:19:46 +08:00
parent cf2c4f44a2
commit b17254925d

View File

@ -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
}