diff --git a/tests/fuzz/ssh_bind_config_fuzzer.c b/tests/fuzz/ssh_bind_config_fuzzer.c index 0d519819..b42342c9 100644 --- a/tests/fuzz/ssh_bind_config_fuzzer.c +++ b/tests/fuzz/ssh_bind_config_fuzzer.c @@ -48,6 +48,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { ssh_bind bind = NULL; char *input = NULL; + const char *env = NULL; input = (char *)malloc(size + 1); if (!input) { @@ -63,6 +64,10 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) goto out; } + env = getenv("LIBSSH_VERBOSITY"); + if (env != NULL && strlen(env) > 0) { + ssh_bind_options_set(bind, SSH_BIND_OPTIONS_LOG_VERBOSITY_STR, env); + } ssh_bind_config_parse_string(bind, input); ssh_bind_free(bind); diff --git a/tests/fuzz/ssh_client_config_fuzzer.c b/tests/fuzz/ssh_client_config_fuzzer.c index 5658b3e4..c6900365 100644 --- a/tests/fuzz/ssh_client_config_fuzzer.c +++ b/tests/fuzz/ssh_client_config_fuzzer.c @@ -47,6 +47,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { ssh_session session = NULL; char *input = NULL; + const char *env = NULL; input = (char *)malloc(size+1); if (!input) { @@ -62,6 +63,10 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) goto out; } + env = getenv("LIBSSH_VERBOSITY"); + if (env != NULL && strlen(env) > 0) { + ssh_options_set(session, SSH_OPTIONS_LOG_VERBOSITY_STR, env); + } /* Make sure we have default options set */ ssh_options_set(session, SSH_OPTIONS_SSH_DIR, NULL); ssh_options_set(session, SSH_OPTIONS_HOST, "example.com");