Mercurial > dropbear
diff packet.c @ 1558:2f64cb3d3007 fuzz
- #if not #ifdef for DROPBEAR_FUZZ
- fix some unused variables
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Wed, 28 Feb 2018 21:40:08 +0800 |
parents | 5916af64acd4 |
children | 92c93b4a3646 |
line wrap: on
line diff
--- a/packet.c Wed Feb 28 21:28:59 2018 +0800 +++ b/packet.c Wed Feb 28 21:40:08 2018 +0800 @@ -77,7 +77,7 @@ /* This may return EAGAIN. The main loop sometimes calls write_packet() without bothering to test with select() since it's likely to be necessary */ -#ifdef DROPBEAR_FUZZ +#if DROPBEAR_FUZZ if (fuzz.fuzzing) { // pretend to write one packet at a time // TODO(fuzz): randomise amount written based on the fuzz input @@ -105,7 +105,7 @@ } #else /* No writev () */ -#ifdef DROPBEAR_FUZZ +#if DROPBEAR_FUZZ _Static_assert(0, "No fuzzing code for no-writev writes"); #endif /* Get the next buffer in the queue of encrypted packets to write*/ @@ -366,7 +366,7 @@ buf_setpos(ses.readbuf, 0); make_mac(ses.recvseq, &ses.keys->recv, ses.readbuf, contents_len, mac_bytes); -#ifdef DROPBEAR_FUZZ +#if DROPBEAR_FUZZ if (fuzz.fuzzing) { // fail 1 in 2000 times to test error path. // note that mac_bytes is all zero prior to kex, so don't test ==0 !