From: Aki Tuomi Date: Tue, 16 Aug 2016 11:36:07 +0000 (+0300) Subject: auth: Check for NULL auth token X-Git-Tag: 2.2.26~344 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=be4e6321f350293eec38d42ea97d2faaf3a87b4e;p=thirdparty%2Fdovecot%2Fcore.git auth: Check for NULL auth token Makes static analysers happy --- diff --git a/src/auth/mech-dovecot-token.c b/src/auth/mech-dovecot-token.c index a940d53518..8f63e028d8 100644 --- a/src/auth/mech-dovecot-token.c +++ b/src/auth/mech-dovecot-token.c @@ -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 {