summaryrefslogtreecommitdiff
path: root/libtomcrypt
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2016-03-17 23:21:33 +0800
committerMatt Johnston <matt@ucc.asn.au>2016-03-17 23:21:33 +0800
commit424d765f954f5313441370ca7ac2830e6ecc6cdb (patch)
tree38c619ecdf74cc7472f0aa9938ea1bfa9234d30f /libtomcrypt
parenteb67bd041d3da34e0b5c6803b5d915f444751ab6 (diff)
downloaddropbear-424d765f954f5313441370ca7ac2830e6ecc6cdb.tar.gz
move m_burn and function attributes to dbhelpers
use m_burn for libtomcrypt zeromem() too
Diffstat (limited to 'libtomcrypt')
-rw-r--r--libtomcrypt/src/headers/tomcrypt_custom.h2
-rw-r--r--libtomcrypt/src/misc/zeromem.c7
2 files changed, 3 insertions, 6 deletions
diff --git a/libtomcrypt/src/headers/tomcrypt_custom.h b/libtomcrypt/src/headers/tomcrypt_custom.h
index cbfaeb3..82cb26e 100644
--- a/libtomcrypt/src/headers/tomcrypt_custom.h
+++ b/libtomcrypt/src/headers/tomcrypt_custom.h
@@ -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 */
diff --git a/libtomcrypt/src/misc/zeromem.c b/libtomcrypt/src/misc/zeromem.c
index 42dc3c2..9f6ba9b 100644
--- a/libtomcrypt/src/misc/zeromem.c
+++ b/libtomcrypt/src/misc/zeromem.c
@@ -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 $ */