mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-08-05 20:55:46 +03:00
fuzz: Do not parse configuration files
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
committed by
Andreas Schneider
parent
ae184db913
commit
e26e98e59f
@@ -90,6 +90,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
|
|||||||
const char *env = NULL;
|
const char *env = NULL;
|
||||||
int socket_fds[2] = {-1, -1};
|
int socket_fds[2] = {-1, -1};
|
||||||
ssize_t nwritten;
|
ssize_t nwritten;
|
||||||
|
bool no = false;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
/* Set up the socket to send data */
|
/* Set up the socket to send data */
|
||||||
@@ -125,6 +126,8 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
|
|||||||
assert(rc == 0);
|
assert(rc == 0);
|
||||||
rc = ssh_options_set(session, SSH_OPTIONS_HMAC_S_C, "none");
|
rc = ssh_options_set(session, SSH_OPTIONS_HMAC_S_C, "none");
|
||||||
assert(rc == 0);
|
assert(rc == 0);
|
||||||
|
rc = ssh_options_set(session, SSH_OPTIONS_PROCESS_CONFIG, &no);
|
||||||
|
assert(rc == 0);
|
||||||
|
|
||||||
ssh_callbacks_init(&cb);
|
ssh_callbacks_init(&cb);
|
||||||
ssh_set_callbacks(session, &cb);
|
ssh_set_callbacks(session, &cb);
|
||||||
|
@@ -119,6 +119,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
|
|||||||
{
|
{
|
||||||
int socket_fds[2] = {-1, -1};
|
int socket_fds[2] = {-1, -1};
|
||||||
ssize_t nwritten;
|
ssize_t nwritten;
|
||||||
|
bool no = false;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
/* Our struct holding information about the session. */
|
/* Our struct holding information about the session. */
|
||||||
@@ -167,6 +168,8 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
|
|||||||
assert(rc == 0);
|
assert(rc == 0);
|
||||||
rc = ssh_bind_options_set(sshbind, SSH_BIND_OPTIONS_HMAC_S_C, "none");
|
rc = ssh_bind_options_set(sshbind, SSH_BIND_OPTIONS_HMAC_S_C, "none");
|
||||||
assert(rc == 0);
|
assert(rc == 0);
|
||||||
|
rc = ssh_bind_options_set(sshbind, SSH_BIND_OPTIONS_PROCESS_CONFIG, &no);
|
||||||
|
assert(rc == 0);
|
||||||
|
|
||||||
ssh_set_auth_methods(session, SSH_AUTH_METHOD_NONE);
|
ssh_set_auth_methods(session, SSH_AUTH_METHOD_NONE);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user