From a8587f56970162dea17fe5a8c46b6e10ecb4d96b Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Thu, 2 Mar 2017 10:18:41 +0100 Subject: [PATCH] Ensure to check the auth command return value refs #4991 --- lib/redis/rediswriter.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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;