summaryrefslogtreecommitdiffhomepage
path: root/netio.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2020-12-06 21:54:01 +0800
committerMatt Johnston <matt@ucc.asn.au>2020-12-06 21:54:01 +0800
commite12ff23e7d530613f7e876d366b52d04072a0e06 (patch)
tree462fb0c743f888fc08f4c1da3617805604ea3741 /netio.c
parent007a5925dcdc63c9aa2550c902a8a0493465ba20 (diff)
fuzz: add an always-failing dropbear_listen() replacement
Diffstat (limited to 'netio.c')
-rw-r--r--netio.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/netio.c b/netio.c
index eee5119..83ae33c 100644
--- a/netio.c
+++ b/netio.c
@@ -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 */