From 412d134acc03ccdb7db12e238a270a035ae9e019 Mon Sep 17 00:00:00 2001 From: "Andrey A. Chernov" Date: Tue, 12 Aug 2014 13:28:46 +0000 Subject: [PATCH] According to opie code and even direct mention in opie(4) challenge buffer size must be OPIE_CHALLENGE_MAX + 1, not OPIE_CHALLENGE_MAX Reviewed by: des MFC after: 1 week --- lib/libpam/modules/pam_opie/pam_opie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libpam/modules/pam_opie/pam_opie.c b/lib/libpam/modules/pam_opie/pam_opie.c index bfb875f88317..9625373d9d3e 100644 --- a/lib/libpam/modules/pam_opie/pam_opie.c +++ b/lib/libpam/modules/pam_opie/pam_opie.c @@ -62,7 +62,7 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags __unused, struct passwd *pwd; int retval, i; const char *(promptstr[]) = { "%s\nPassword: ", "%s\nPassword [echo on]: "}; - char challenge[OPIE_CHALLENGE_MAX]; + char challenge[OPIE_CHALLENGE_MAX + 1]; char principal[OPIE_PRINCIPAL_MAX]; const char *user; char *response;