diff --git a/tests/fuzz/ssh_client_fuzzer.c b/tests/fuzz/ssh_client_fuzzer.c index 3f9c16d4..e69bf385 100644 --- a/tests/fuzz/ssh_client_fuzzer.c +++ b/tests/fuzz/ssh_client_fuzzer.c @@ -93,6 +93,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) ssize_t nwritten; bool no = false; int rc; + long timeout = 1; /* use short timeout to avoid timeouts during fuzzing */ /* This is the maximum that can be handled by the socket buffer before the * other side will read some data. Other option would be feeding the socket @@ -137,6 +138,8 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) assert(rc == 0); rc = ssh_options_set(session, SSH_OPTIONS_PROCESS_CONFIG, &no); assert(rc == 0); + rc = ssh_options_set(session, SSH_OPTIONS_TIMEOUT, &timeout); + assert(rc == 0); ssh_callbacks_init(&cb); ssh_set_callbacks(session, &cb);