summaryrefslogtreecommitdiffhomepage
path: root/netio.c
diff options
context:
space:
mode:
Diffstat (limited to 'netio.c')
-rw-r--r--netio.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/netio.c b/netio.c
index dbba5cd..0d69d3a 100644
--- a/netio.c
+++ b/netio.c
@@ -179,12 +179,6 @@ struct dropbear_progress_connection *connect_remote(const char* remotehost, cons
int err;
struct addrinfo hints;
-#if DROPBEAR_FUZZ
- if (fuzz.fuzzing) {
- return fuzz_connect_remote(remotehost, remoteport, cb, cb_data, bind_address, bind_port);
- }
-#endif
-
c = m_malloc(sizeof(*c));
c->remotehost = m_strdup(remotehost);
c->remoteport = m_strdup(remoteport);
@@ -194,6 +188,13 @@ struct dropbear_progress_connection *connect_remote(const char* remotehost, cons
list_append(&ses.conn_pending, c);
+#if DROPBEAR_FUZZ
+ if (fuzz.fuzzing) {
+ c->errstring = m_strdup("fuzzing connect_remote always fails");
+ return c;
+ }
+#endif
+
memset(&hints, 0, sizeof(hints));
hints.ai_socktype = SOCK_STREAM;
hints.ai_family = AF_UNSPEC;