# HG changeset patch # User Matt Johnston # Date 1497188380 -28800 # Node ID 27e65d3aed5f4bc6f2202c462f1d2fbf6634889f # Parent f0990c2846632d2d7dd018a0e53c736cca7db65e fix checkmac always failing pre-kex diff -r f0990c284663 -r 27e65d3aed5f packet.c --- a/packet.c Fri Jun 02 00:03:51 2017 +0800 +++ b/packet.c Sun Jun 11 21:39:40 2017 +0800 @@ -372,9 +372,10 @@ #ifdef DROPBEAR_FUZZ if (fuzz.fuzzing) { - // fail 1 in 1000 times to test error path + // fail 1 in 2000 times to test error path. + // note that mac_bytes is all zero prior to kex, so don't test ==0 ! unsigned int value = *((unsigned int*)&mac_bytes); - if (value % 1000 == 0) { + if (value % 2000 == 99) { return DROPBEAR_FAILURE; } return DROPBEAR_SUCCESS;