diff fuzz-common.c @ 1383:f03cfe9c76ac fuzz

Disable setnonblocking(), get_socket_address(), set_sock_priority() for fuzzing
author Matt Johnston <matt@ucc.asn.au>
date Fri, 26 May 2017 22:10:51 +0800
parents d4cc85e6c569
children 6c92e97553f1
line wrap: on
line diff
--- a/fuzz-common.c	Fri May 26 22:09:30 2017 +0800
+++ b/fuzz-common.c	Fri May 26 22:10:51 2017 +0800
@@ -115,3 +115,19 @@
 void fuzz_kex_fakealgos(void) {
     ses.newkeys->recv.crypt_mode = &dropbear_mode_none;
 }
+
+void fuzz_get_socket_address(int UNUSED(fd), char **local_host, char **local_port,
+                        char **remote_host, char **remote_port, int UNUSED(host_lookup)) {
+    if (local_host) {
+        *local_host = m_strdup("fuzzlocalhost");
+    }
+    if (local_port) {
+        *local_port = m_strdup("1234");
+    }
+    if (remote_host) {
+        *remote_host = m_strdup("fuzzremotehost");
+    }
+    if (remote_port) {
+        *remote_port = m_strdup("9876");
+    }
+}