The io_write() interceptor. * * If the fuzzer-generated Act 1 packet was valid, this should be called exactly * once. Otherwise it should not be called at all. */
| 19 | * If the fuzzer-generated Act 1 packet was valid, this should be called exactly |
| 20 | * once. Otherwise it should not be called at all. */ |
| 21 | static struct io_plan * |
| 22 | test_write(struct io_conn *conn, const void *data, size_t len, |
| 23 | struct io_plan *(*next)(struct io_conn *, struct handshake *), |
| 24 | struct handshake *h) |
| 25 | { |
| 26 | ++write_count; |
| 27 | assert(write_count == 1 && "too many calls to io_write()"); |
| 28 | |
| 29 | /* Act 1 packet validation succeeded. Responder is sending the Act 2 |
| 30 | * packet. Check that it is initialized. */ |
| 31 | assert(len == ACT_TWO_SIZE); |
| 32 | memcheck(data, len); |
| 33 | |
| 34 | return handshake_failed(conn, h); |
| 35 | } |
| 36 | |
| 37 | /* The io_read() interceptor. |
| 38 | * |
nothing calls this directly
no outgoing calls
no test coverage detected