From: Michael Friedrich Date: Thu, 2 Mar 2017 09:18:41 +0000 (+0100) Subject: Ensure to check the auth command return value X-Git-Tag: v2.7.0~215 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a8587f56970162dea17fe5a8c46b6e10ecb4d96b;p=icinga2 Ensure to check the auth command return value refs #4991 --- diff --git a/lib/redis/rediswriter.cpp b/lib/redis/rediswriter.cpp index 5d75f5b70..722d2a323 100644 --- a/lib/redis/rediswriter.cpp +++ b/lib/redis/rediswriter.cpp @@ -67,6 +67,10 @@ void RedisWriter::ConnectionThreadProc(void) if (!password.IsEmpty()) { redisReply *reply = reinterpret_cast(redisCommand(m_Context, "AUTH %s", password.CStr())); + //TODO: Verify if we can continue here. + if (!reply) + continue; + if (reply->type == REDIS_REPLY_STATUS || reply->type == REDIS_REPLY_ERROR) { Log(LogInformation, "RedisWriter") << "AUTH: " << reply->str;