# HG changeset patch # User Matt Johnston # Date 1519827043 -28800 # Node ID 02b226c2675ebce61bcf58ad348cf1f57fc735bd # Parent 92c93b4a36467b5e4a9e25a403f41180bab408a6 clean some fuzzing conditionals diff -r 92c93b4a3646 -r 02b226c2675e dbrandom.c --- a/dbrandom.c Wed Feb 28 22:02:12 2018 +0800 +++ b/dbrandom.c Wed Feb 28 22:10:43 2018 +0800 @@ -146,7 +146,7 @@ hash_state hs; #if DROPBEAR_FUZZ - if (fuzz.fuzzing || fuzz.recordf) { + if (fuzz.fuzzing) { return; } #endif @@ -164,7 +164,7 @@ static void write_urandom() { #if DROPBEAR_FUZZ - if (fuzz.fuzzing || fuzz.recordf) { + if (fuzz.fuzzing) { return; } #endif @@ -204,7 +204,7 @@ clock_t clockval; #if DROPBEAR_FUZZ - if (fuzz.fuzzing || fuzz.recordf) { + if (fuzz.fuzzing) { return; } #endif diff -r 92c93b4a3646 -r 02b226c2675e fuzz.h --- a/fuzz.h Wed Feb 28 22:02:12 2018 +0800 +++ b/fuzz.h Wed Feb 28 22:10:43 2018 +0800 @@ -43,9 +43,6 @@ struct dropbear_fuzz_options { int fuzzing; - // to record an unencrypted stream - FILE* recordf; - // fuzzing input buffer *input; struct dropbear_cipher recv_cipher; diff -r 92c93b4a3646 -r 02b226c2675e svr-auth.c --- a/svr-auth.c Wed Feb 28 22:02:12 2018 +0800 +++ b/svr-auth.c Wed Feb 28 22:10:43 2018 +0800 @@ -396,12 +396,11 @@ /* We delay for 300ms +- 50ms */ delay = 250000 + (delay % 100000); #if DROPBEAR_FUZZ - if (!fuzz.fuzzing) { + if (!fuzz.fuzzing) +#endif + { usleep(delay); } -#else - usleep(delay); -#endif ses.authstate.failcount++; }