diff packet.c @ 1348:5c2899e35b63 fuzz

fuzz harness
author Matt Johnston <matt@ucc.asn.au>
date Sat, 13 May 2017 22:50:54 +0800
parents b28624698130
children 08f4fa4dc6a0
line wrap: on
line diff
--- a/packet.c	Fri May 12 23:14:54 2017 +0800
+++ b/packet.c	Sat May 13 22:50:54 2017 +0800
@@ -36,6 +36,7 @@
 #include "channel.h"
 #include "netio.h"
 #include "runopts.h"
+#include "fuzz.h"
 
 static int read_packet_init(void);
 static void make_mac(unsigned int seqno, const struct key_context_directional * key_state,
@@ -78,7 +79,7 @@
 	calls write_packet() without bothering to test with select() since
 	it's likely to be necessary */
 #ifdef DROPBEAR_FUZZ
-	if (opts.fuzz.fuzzing) {
+	if (fuzz.fuzzing) {
 		// pretend to write one packet at a time
 		// TODO(fuzz): randomise amount written based on the fuzz input
 		written = iov[0].iov_len;