Skip to content

Commit 669bf92

Browse files
committed
Fix crash when client has no hostname
If the client is not provided a hostname, `ClientPublicKeyCheck` would crash trying to match `targetName`. A hostname is required.
1 parent 759bcbd commit 669bf92

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

apps/wolfssh/wolfssh.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -923,6 +923,9 @@ static THREAD_RETURN WOLFSSH_THREAD wolfSSH_Client(void* args)
923923
if (config.user == NULL)
924924
err_sys("client requires a username parameter.");
925925

926+
if (config.hostname == NULL)
927+
err_sys("client requires a hostname parameter.");
928+
926929
#ifdef SINGLE_THREADED
927930
if (keepOpen)
928931
err_sys("Threading needed for terminal session\n");

0 commit comments

Comments
 (0)