mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-12-12 15:41:16 +03:00
Fix an invalid strlen comparison in ssh_message_auth_reply_default
During the transition to strncat in ssh_message_auth_reply_default, an invalid strlen comparison was added which causes the function to fail whenever it's called. Signed-off-by: Andrew Collins <bsderandrew@gmail.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
committed by
Andreas Schneider
parent
de9bc1fa41
commit
5cd7942801
@@ -596,7 +596,7 @@ static int ssh_message_auth_reply_default(ssh_message msg,int partial) {
|
||||
sizeof(methods_c) - strlen(methods_c) - 1);
|
||||
}
|
||||
|
||||
if (methods_c[0] == '\0' || strlen(methods_c) != ',') {
|
||||
if (methods_c[0] == '\0' || methods_c[strlen(methods_c)-1] != ',') {
|
||||
return SSH_ERROR;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user