mirror of https://github.com/wolfSSL/wolfssh.git
auth test case account for no null terminator with strings when comparing values
parent
1bee0c19ab
commit
b60c599c36
|
|
@ -249,8 +249,9 @@ static int serverUserAuth(byte authType, WS_UserAuthData* authData, void* ctx)
|
|||
return WOLFSSH_USERAUTH_FAILURE;
|
||||
|
||||
}
|
||||
if (WSTRCMP((const char*)authData->sf.keyboard.responses[resp],
|
||||
(const char*)kbResponses[resp]) != 0) {
|
||||
if (WSTRNCMP((const char*)authData->sf.keyboard.responses[resp],
|
||||
(const char*)kbResponses[resp],
|
||||
kbResponseLengths[resp]) != 0) {
|
||||
return WOLFSSH_USERAUTH_FAILURE;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue