summaryrefslogtreecommitdiffhomepage
path: root/fuzz-common.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2017-05-26 22:10:51 +0800
committerMatt Johnston <matt@ucc.asn.au>2017-05-26 22:10:51 +0800
commit4d07aa315b8e019a3795da9a290ca4d71d7f87c2 (patch)
tree6ddc590f0eb3e5664003ec6fc583bdfd70690932 /fuzz-common.c
parent2e298b25e43199162e1209616acf0485f0f94974 (diff)
Disable setnonblocking(), get_socket_address(), set_sock_priority()
for fuzzing --HG-- branch : fuzz
Diffstat (limited to 'fuzz-common.c')
-rw-r--r--fuzz-common.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/fuzz-common.c b/fuzz-common.c
index 4c5da70..2d9044c 100644
--- a/fuzz-common.c
+++ b/fuzz-common.c
@@ -115,3 +115,19 @@ static void load_fixed_hostkeys(void) {
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");
+ }
+}