Skip to content

Commit 45534b0

Browse files
sanity check on state before dereference
1 parent 76a8d82 commit 45534b0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/internal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9868,7 +9868,7 @@ int SendKexInit(WOLFSSH* ssh)
98689868
if (ssh == NULL)
98699869
ret = WS_BAD_ARGUMENT;
98709870

9871-
if (ssh->ctx->side == WOLFSSH_ENDPOINT_SERVER &&
9871+
if (ret == WS_SUCCESS && ssh->ctx->side == WOLFSSH_ENDPOINT_SERVER &&
98729872
ssh->ctx->privateKeyCount == 0) {
98739873
WLOG(WS_LOG_DEBUG, "Server needs at least one private key");
98749874
ret = WS_BAD_ARGUMENT;

0 commit comments

Comments
 (0)