Skip to content
Snippets Groups Projects
Commit b1725492 authored by Matt Johnston's avatar Matt Johnston
Browse files

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

--HG--
branch : fuzz
parent cf2c4f44
No related merge requests found
...@@ -9,16 +9,8 @@ void m_burn(void *data, unsigned int len) { ...@@ -9,16 +9,8 @@ void m_burn(void *data, unsigned int len) {
#elif defined(HAVE_EXPLICIT_BZERO) #elif defined(HAVE_EXPLICIT_BZERO)
explicit_bzero(data, len); explicit_bzero(data, len);
#else #else
/* Based on the method in David Wheeler's volatile void *p = data;
* "Secure Programming for Linux and Unix HOWTO". May not be safe memset(p, 0x0, len);
* against link-time optimisation. */
volatile char *p = data;
if (data == NULL)
return;
while (len--) {
*p++ = 0x0;
}
#endif #endif
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment