diff fuzz-common.c @ 1357:08f4fa4dc6a0 fuzz

closer to working
author Matt Johnston <matt@ucc.asn.au>
date Sat, 20 May 2017 13:23:16 +0800
parents 3677a510f545
children 6b89eb92f872
line wrap: on
line diff
--- a/fuzz-common.c	Fri May 19 00:48:46 2017 +0800
+++ b/fuzz-common.c	Sat May 20 13:23:16 2017 +0800
@@ -1,7 +1,5 @@
 #include "includes.h"
 
-#ifdef DROPBEAR_FUZZ
-
 #include "includes.h"
 #include "fuzz.h"
 #include "dbutil.h"
@@ -17,6 +15,7 @@
 
 static void common_setup_fuzzer(void) {
     fuzz.fuzzing = 1;
+    fuzz.wrapfds = 1;
     fuzz.input = m_malloc(sizeof(buffer));
     crypto_init();
 }
@@ -30,7 +29,7 @@
 
     // get prefix. input format is
     // string prefix
-    //     uint32_t seed
+    //     uint32 wrapfd seed
     //     ... to be extended later
     // [bytes] ssh input stream
 
@@ -114,4 +113,6 @@
     buf_free(b);
 }
 
-#endif /* DROPBEAR_FUZZ */
+void fuzz_kex_fakealgos(void) {
+    ses.newkeys->recv.crypt_mode = &dropbear_mode_none;
+}