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 /common-session.c | |
parent | 5d065258da487301f269e795694702b5349de69f (diff) |
workaround memory sanitizer FD_ZERO false positives
Diffstat (limited to 'common-session.c')
-rw-r--r-- | common-session.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/common-session.c b/common-session.c index 41bf5b3..96dd4dc 100644 --- a/common-session.c +++ b/common-session.c @@ -152,8 +152,9 @@ void session_loop(void(*loophandler)(void)) { timeout.tv_sec = select_timeout(); timeout.tv_usec = 0; - FD_ZERO(&writefd); - FD_ZERO(&readfd); + DROPBEAR_FD_ZERO(&writefd); + DROPBEAR_FD_ZERO(&readfd); + dropbear_assert(ses.payload == NULL); /* We get woken up when signal handlers write to this pipe. @@ -204,8 +205,8 @@ void session_loop(void(*loophandler)(void)) { * want to iterate over channels etc for reading, to handle * server processes exiting etc. * We don't want to read/write FDs. */ - FD_ZERO(&writefd); - FD_ZERO(&readfd); + DROPBEAR_FD_ZERO(&writefd); + DROPBEAR_FD_ZERO(&readfd); } /* We'll just empty out the pipe if required. We don't do @@ -406,7 +407,7 @@ static int ident_readln(int fd, char* buf, int count) { return -1; } - FD_ZERO(&fds); + DROPBEAR_FD_ZERO(&fds); /* select since it's a non-blocking fd */ |