summaryrefslogtreecommitdiff
path: root/auth2-pam.c
diff options
context:
space:
mode:
Diffstat (limited to 'auth2-pam.c')
-rw-r--r--auth2-pam.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/auth2-pam.c b/auth2-pam.c
index dd29ebd4..99aedeae 100644
--- a/auth2-pam.c
+++ b/auth2-pam.c
@@ -1,5 +1,5 @@
#include "includes.h"
-RCSID("$Id: auth2-pam.c,v 1.12 2002/01/22 12:43:13 djm Exp $");
+RCSID("$Id: auth2-pam.c,v 1.13 2002/06/26 13:58:00 djm Exp $");
#ifdef USE_PAM
#include <security/pam_appl.h>
@@ -140,6 +140,15 @@ input_userauth_info_response_pam(int type, u_int32_t seqnr, void *ctxt)
nresp = packet_get_int(); /* Number of responses. */
debug("got %d responses", nresp);
+
+ if (nresp != context_pam2.num_expected)
+ fatal("%s: Received incorrect number of responses "
+ "(expected %u, received %u)", __func__, nresp,
+ context_pam2.num_expected);
+
+ if (nresp > 100)
+ fatal("%s: too many replies", __func__);
+
for (i = 0; i < nresp; i++) {
int j = context_pam2.prompts[i];