diff dbrandom.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 3fdd8c5a0195
line wrap: on
line diff
--- a/dbrandom.c	Fri May 12 23:14:54 2017 +0800
+++ b/dbrandom.c	Sat May 13 22:50:54 2017 +0800
@@ -28,6 +28,7 @@
 #include "bignum.h"
 #include "dbrandom.h"
 #include "runopts.h"
+#include "fuzz.h"
 
 
 /* this is used to generate unique output from the same hashpool */
@@ -147,7 +148,7 @@
 	hash_state hs;
 
 #ifdef DROPBEAR_FUZZ
-	if (opts.fuzz.fuzzing || opts.fuzz.recordf) {
+	if (fuzz.fuzzing || fuzz.recordf) {
 		return;
 	}
 #endif
@@ -165,7 +166,7 @@
 static void write_urandom()
 {
 #ifdef DROPBEAR_FUZZ
-	if (opts.fuzz.fuzzing || opts.fuzz.recordf) {
+	if (fuzz.fuzzing || fuzz.recordf) {
 		return;
 	}
 #endif
@@ -203,7 +204,7 @@
 	clock_t clockval;
 
 #ifdef DROPBEAR_FUZZ
-	if (opts.fuzz.fuzzing || opts.fuzz.recordf) {
+	if (fuzz.fuzzing || fuzz.recordf) {
 		seedfuzz();
 		return;
 	}