Mercurial > dovecot > core-2.2
changeset 20660:05ae6a4d8947
auth: Ensure username can't be left unset in APOP
Makes static analysers happy
author | Aki Tuomi <aki.tuomi@dovecot.fi> |
---|---|
date | Tue, 16 Aug 2016 14:46:08 +0300 |
parents | 50800a4afb26 |
children | aa1ac716269e |
files | src/auth/mech-apop.c |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/auth/mech-apop.c Tue Aug 16 14:42:41 2016 +0300 +++ b/src/auth/mech-apop.c Tue Aug 16 14:46:08 2016 +0300 @@ -101,6 +101,12 @@ 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) {