1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-11-26 01:03:15 +03:00

server: Cast auth_methods to uint32_t

Fixes T188

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
This commit is contained in:
Andreas Schneider
2019-10-31 15:50:21 +01:00
parent 442d22da60
commit 6cef3e10bf

View File

@@ -510,9 +510,11 @@ static int ssh_server_kex_termination(void *s){
return 1; return 1;
} }
void ssh_set_auth_methods(ssh_session session, int auth_methods){ /* FIXME: auth_methods should be unsigned */
/* accept only methods in range */ void ssh_set_auth_methods(ssh_session session, int auth_methods)
session->auth.supported_methods = auth_methods & 0x3f; {
/* accept only methods in range */
session->auth.supported_methods = (uint32_t)auth_methods & 0x3fU;
} }
/* Do the banner and key exchange */ /* Do the banner and key exchange */