summaryrefslogtreecommitdiffhomepage
path: root/dbutil.h
diff options
context:
space:
mode:
Diffstat (limited to 'dbutil.h')
-rw-r--r--dbutil.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/dbutil.h b/dbutil.h
index 645b428..7cb9d68 100644
--- a/dbutil.h
+++ b/dbutil.h
@@ -30,6 +30,7 @@
#include "buffer.h"
#include "queue.h"
#include "dbhelpers.h"
+#include "dbmalloc.h"
#ifndef DISABLE_SYSLOG
void startsyslog(const char *ident);
@@ -66,10 +67,6 @@ int buf_readfile(buffer* buf, const char* filename);
int buf_getline(buffer * line, FILE * authfile);
void m_close(int fd);
-void * m_malloc(size_t size);
-void * m_strdup(const char * str);
-void * m_realloc(void* ptr, size_t size);
-#define m_free(X) do {free(X); (X) = NULL;} while (0)
void setnonblocking(int fd);
void disallow_core(void);
int m_str_to_uint(const char* str, unsigned int *val);
@@ -91,4 +88,11 @@ char * expand_homedir_path(const char *inpath);
void fsync_parent_dir(const char* fn);
+#if DROPBEAR_MSAN
+/* FD_ZERO seems to leave some memory uninitialized. clear it to avoid false positives */
+#define DROPBEAR_FD_ZERO(fds) do { memset((fds), 0x0, sizeof(fd_set)); FD_ZERO(fds); } while(0)
+#else
+#define DROPBEAR_FD_ZERO(fds) FD_ZERO(fds)
+#endif
+
#endif /* DROPBEAR_DBUTIL_H_ */