From 6cef3e10bf7fe6d2967c3dd1dc5c8bd3dc4a3e43 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Thu, 31 Oct 2019 15:50:21 +0100 Subject: [PATCH] server: Cast auth_methods to uint32_t Fixes T188 Signed-off-by: Andreas Schneider Reviewed-by: Jakub Jelen --- src/server.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/server.c b/src/server.c index 917569db..0a787eee 100644 --- a/src/server.c +++ b/src/server.c @@ -510,9 +510,11 @@ static int ssh_server_kex_termination(void *s){ return 1; } -void ssh_set_auth_methods(ssh_session session, int auth_methods){ - /* accept only methods in range */ - session->auth.supported_methods = auth_methods & 0x3f; +/* FIXME: auth_methods should be unsigned */ +void ssh_set_auth_methods(ssh_session session, int auth_methods) +{ + /* accept only methods in range */ + session->auth.supported_methods = (uint32_t)auth_methods & 0x3fU; } /* Do the banner and key exchange */