Skip to content

Commit

Permalink
auth: Check for NULL auth token
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 23554f9 commit be4e632
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/auth/mech-dovecot-token.c
Expand Up @@ -51,7 +51,8 @@ mech_dovecot_token_auth_continue(struct auth_request *request,
const char *valid_token =
auth_token_get(service, pid, request->user, session_id);

if (strcmp(auth_token, valid_token) == 0) {
if (auth_token != NULL &&
strcmp(auth_token, valid_token) == 0) {
request->passdb_success = TRUE;
auth_request_success(request, NULL, 0);
} else {
Expand Down

0 comments on commit be4e632

Please sign in to comment.