summaryrefslogtreecommitdiffhomepage
path: root/dbutil.c
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
commit420151dbd9e9737fcb7df46529b5fa63a10b8efa (patch)
tree47e6ec4fc3bfcd6923c7669a50d5e25ed6d96644 /dbutil.c
parent156b28c771f9a2b18bd3ddde6d6b3c193999c904 (diff)
move m_burn and function attributes to dbhelpers
use m_burn for libtomcrypt zeromem() too
Diffstat (limited to 'dbutil.c')
-rw-r--r--dbutil.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/dbutil.c b/dbutil.c
index 27f0fd1..ef06802 100644
--- a/dbutil.c
+++ b/dbutil.c
@@ -559,28 +559,6 @@ void * m_realloc(void* ptr, size_t size) {
return ret;
}
-/* Clear the data, based on the method in David Wheeler's
- * "Secure Programming for Linux and Unix HOWTO" */
-/* Beware of calling this from within dbutil.c - things might get
- * optimised away */
-void m_burn(void *data, unsigned int len) {
-
-#if defined(HAVE_MEMSET_S)
- memset_s(data, len, 0x0, len);
-#elif defined(HAVE_EXPLICIT_BZERO)
- explicit_bzero(data, len);
-#else
- volatile char *p = data;
-
- if (data == NULL)
- return;
- while (len--) {
- *p++ = 0x0;
- }
-#endif
-}
-
-
void setnonblocking(int fd) {
TRACE(("setnonblocking: %d", fd))