From c33ceddc263514440dc49605fd22658eaaae38c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bernhard=20Rosenkr=C3=A4nzer?= Date: Thu, 26 Jan 2017 16:48:48 +0100 Subject: [PATCH] Don't crash on bogus keys in login.defs if PAM is enabled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Without this patch, PAM enabled builds crash when encountering an invalid key in login.defs or key overrides because of array overflows To reproduce, simply useradd -K Windows=broken Signed-off-by: Bernhard Rosenkränzer Signed-off-by: Serge Hallyn --- lib/getdef.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/getdef.c b/lib/getdef.c index bea28129..a181cc2b 100644 --- a/lib/getdef.c +++ b/lib/getdef.c @@ -148,6 +148,7 @@ static struct itemdef knowndef_table[] = { #ifdef USE_PAM PAMDEFS #endif + {NULL, NULL} }; #ifndef LOGINDEFS