fuzz: add an always-failing dropbear_listen() replacement

This commit is contained in:
Matt Johnston
2020-12-06 21:54:01 +08:00
parent 007a5925dc
commit e12ff23e7d
3 changed files with 26 additions and 0 deletions

View File

@@ -461,6 +461,12 @@ int dropbear_listen(const char* address, const char* port,
int sock;
TRACE(("enter dropbear_listen"))
#if DROPBEAR_FUZZ
if (fuzz.fuzzing) {
return fuzz_dropbear_listen(address, port, socks, sockcount, errstring, maxfd);
}
#endif
memset(&hints, 0, sizeof(hints));
hints.ai_family = AF_UNSPEC; /* TODO: let them flag v4 only etc */