view dbhelpers.c @ 1393:ab4a3f783bfd

Add .gitignore file Ignored are all files created when building from a git checkout as well as anything deleted by 'make clean'. Signed-off-by: Ben Gardner <[email protected]>
author Ben Gardner <>
date Wed, 25 May 2016 10:17:31 -0500
parents 3017bc7d6238
children 4b1a807a3188
line wrap: on
line source
#include "dbhelpers.h"
#include "includes.h"

/* Erase data */
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);
/* 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)
	while (len--) {
		*p++ = 0x0;