diff svr-auth.c @ 1347:b28624698130 fuzz

copy over some fuzzing code from AFL branch
author Matt Johnston <matt@ucc.asn.au>
date Fri, 12 May 2017 23:14:54 +0800
parents 9169e4e7cbee
children 5c2899e35b63
line wrap: on
line diff
--- a/svr-auth.c	Fri May 12 22:14:49 2017 +0800
+++ b/svr-auth.c	Fri May 12 23:14:54 2017 +0800
@@ -358,7 +358,11 @@
 		genrandom((unsigned char*)&delay, sizeof(delay));
 		/* We delay for 300ms +- 50ms */
 		delay = 250000 + (delay % 100000);
-		usleep(delay);
+#ifndef DROPBEAR_FUZZ
+		if (!opts.fuzz.fuzzing) {
+			usleep(delay);
+		}
+#endif
 		ses.authstate.failcount++;
 	}