mirror of
https://github.com/clearml/dropbear
synced 2025-02-07 13:21:15 +00:00
Just use memset, it should'be be optimised out in a separate file
--HG-- branch : fuzz
This commit is contained in:
parent
cf2c4f44a2
commit
b17254925d
12
dbhelpers.c
12
dbhelpers.c
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user