Commit 7b670805 authored by antirez's avatar antirez
Browse files

Missing return REDIS_ERR added to processMultibulkBuffer().

When we set a protocol error we should return with REDIS_ERR to let the
caller know it should stop processing the client.

Bug found in a code auditing related to issue #1699.
parent e99e45be
...@@ -1000,8 +1000,10 @@ int processMultibulkBuffer(redisClient *c) { ...@@ -1000,8 +1000,10 @@ int processMultibulkBuffer(redisClient *c) {
newline = strchr(c->querybuf+pos,'\r'); newline = strchr(c->querybuf+pos,'\r');
if (newline == NULL) { if (newline == NULL) {
if (sdslen(c->querybuf) > REDIS_INLINE_MAX_SIZE) { if (sdslen(c->querybuf) > REDIS_INLINE_MAX_SIZE) {
addReplyError(c,"Protocol error: too big bulk count string"); addReplyError(c,
"Protocol error: too big bulk count string");
setProtocolError(c,0); setProtocolError(c,0);
return REDIS_ERR;
} }
break; break;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment