From 3b5bdc5db440b8bf2d142631cac44c4eb052e7bc Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Sun, 11 Sep 2011 15:29:27 +0200 Subject: auth: Check if we have any prompts. --- src/auth.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/auth.c b/src/auth.c index f56bad34..387f2785 100644 --- a/src/auth.c +++ b/src/auth.c @@ -1684,9 +1684,10 @@ SSH_PACKET_CALLBACK(ssh_packet_userauth_info_request) { nprompts = ntohl(nprompts); ssh_log(session,SSH_LOG_PACKET,"kbdint: %d prompts",nprompts); - if (nprompts > KBDINT_MAX_PROMPT) { + if (nprompts == 0 || + nprompts > KBDINT_MAX_PROMPT) { ssh_set_error(session, SSH_FATAL, - "Too much prompt asked from server: %u (0x%.4x)", + "Wrong number of prompts requested by the server: %u (0x%.4x)", nprompts, nprompts); ssh_kbdint_free(session->kbdint); session->kbdint = NULL; -- cgit