Skip to content

Commit

Permalink
auth: Ensure username can't be left unset in APOP
Browse files Browse the repository at this point in the history
Makes static analysers happy
  • Loading branch information
cmouse authored and sirainen committed Aug 17, 2016
1 parent d18e554 commit 45e3aa0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/auth/mech-apop.c
Expand Up @@ -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) {
Expand Down

0 comments on commit 45e3aa0

Please sign in to comment.