From 4ad29d683940a58dbdbeb9ec6bb63536a61acd76 Mon Sep 17 00:00:00 2001 From: Aki Tuomi Date: Tue, 16 Aug 2016 14:46:08 +0300 Subject: [PATCH] auth: Ensure username can't be left unset in APOP Makes static analysers happy --- src/auth/mech-apop.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/auth/mech-apop.c b/src/auth/mech-apop.c index 4c7a530876..aed248d49f 100644 --- a/src/auth/mech-apop.c +++ b/src/auth/mech-apop.c @@ -101,6 +101,12 @@ mech_apop_auth_initial(struct auth_request *auth_request, username = ++tmp; while (tmp != end && *tmp != '\0') tmp++; + } else { + /* should never happen */ + auth_request_log_info(auth_request, AUTH_SUBSYS_MECH, + "malformed data"); + auth_request_fail(auth_request); + return; } if (tmp + 1 + 16 != end) { -- 2.47.3