mirror of
https://github.com/clearml/dropbear
synced 2025-06-26 18:17:32 +00:00
move m_burn and function attributes to dbhelpers
use m_burn for libtomcrypt zeromem() too
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#ifndef TOMCRYPT_CUSTOM_H_
|
||||
#define TOMCRYPT_CUSTOM_H_
|
||||
|
||||
/* this will sort out which stuff based on the user-config in options.h */
|
||||
/* compile options depend on Dropbear options.h */
|
||||
#include "options.h"
|
||||
|
||||
/* macros for various libc functions you can change for embedded targets */
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
* Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.com
|
||||
*/
|
||||
#include "tomcrypt.h"
|
||||
#include "dbhelpers.h"
|
||||
|
||||
/**
|
||||
@file zeromem.c
|
||||
@@ -22,11 +23,7 @@
|
||||
*/
|
||||
void zeromem(void *out, size_t outlen)
|
||||
{
|
||||
unsigned char *mem = out;
|
||||
LTC_ARGCHKVD(out != NULL);
|
||||
while (outlen-- > 0) {
|
||||
*mem++ = 0;
|
||||
}
|
||||
m_burn(out, outlen);
|
||||
}
|
||||
|
||||
/* $Source: /cvs/libtom/libtomcrypt/src/misc/zeromem.c,v $ */
|
||||
|
||||
Reference in New Issue
Block a user