use corrected version of zeromem() from @dtrebbien
This commit is contained in:
parent
f32e52d5ac
commit
7050bdb7c8
@ -8,7 +8,7 @@ int base64_decode(const unsigned char *in, unsigned long len,
|
||||
#endif
|
||||
|
||||
/* ---- MEM routines ---- */
|
||||
void zeromem(void *dst, size_t len);
|
||||
void zeromem(volatile void *dst, size_t len);
|
||||
void burn_stack(unsigned long len);
|
||||
|
||||
const char *error_to_string(int err);
|
||||
|
@ -20,12 +20,12 @@
|
||||
@param out The destination of the area to zero
|
||||
@param outlen The length of the area to zero (octets)
|
||||
*/
|
||||
void zeromem(void *out, size_t outlen)
|
||||
void zeromem(volatile void *out, size_t outlen)
|
||||
{
|
||||
unsigned char *mem = out;
|
||||
volatile char *mem = out;
|
||||
LTC_ARGCHKVD(out != NULL);
|
||||
while (outlen-- > 0) {
|
||||
*mem++ = 0;
|
||||
*mem++ = '\0';
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user