Skip to content

Commit 13a1c4a

Browse files
committed
check ssh->ctx before dereferencing
1 parent a76e80f commit 13a1c4a

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
@@ -15120,7 +15120,7 @@ static int GetAllowedAuth(WOLFSSH* ssh, char* authStr)
1512015120

1512115121
typeAllowed |= WOLFSSH_USERAUTH_PASSWORD;
1512215122
#ifdef WOLFSSH_KEYBOARD_INTERACTIVE
15123-
if (ssh->ctx->keyboardAuthCb != NULL) {
15123+
if (ssh->ctx && ssh->ctx->keyboardAuthCb) {
1512415124
typeAllowed |= WOLFSSH_USERAUTH_KEYBOARD;
1512515125
}
1512615126
#endif

0 commit comments

Comments
 (0)