Skip to content

Commit

Permalink
NULL check before calling session_handshake
Browse files Browse the repository at this point in the history
  • Loading branch information
willco007 authored Apr 11, 2022
1 parent b95e758 commit 3489ee9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/ossfuzz/ssh2_client_fuzzer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
libssh2_session_set_blocking(session, 1);
}

if(libssh2_session_handshake(session, socket_fds[0])) {
if(session && libssh2_session_handshake(session, socket_fds[0])) {
goto EXIT_LABEL;
}

Expand Down

0 comments on commit 3489ee9

Please sign in to comment.