mirror of
https://github.com/clearml/dropbear
synced 2025-01-31 02:46:58 +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)
|
||||
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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user