diff options
author | Matt Johnston <matt@ucc.asn.au> | 2018-03-06 21:51:51 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2018-03-06 21:51:51 +0800 |
commit | a60725740b65be8679afe612f7fec2639ed0eab7 (patch) | |
tree | 6b8cb9b55c175452598bcfc11f8dbcd6d002b45b /dbutil.h | |
parent | 5d065258da487301f269e795694702b5349de69f (diff) |
workaround memory sanitizer FD_ZERO false positives
Diffstat (limited to 'dbutil.h')
-rw-r--r-- | dbutil.h | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -88,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_ */ |