Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit cb4e2ee

Browse files
committedApr 23, 2014
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 redis#1699.
1 parent 20c040d commit cb4e2ee

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎src/networking.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1000,8 +1000,10 @@ int processMultibulkBuffer(redisClient *c) {
10001000
newline = strchr(c->querybuf+pos,'\r');
10011001
if (newline == NULL) {
10021002
if (sdslen(c->querybuf) > REDIS_INLINE_MAX_SIZE) {
1003-
addReplyError(c,"Protocol error: too big bulk count string");
1003+
addReplyError(c,
1004+
"Protocol error: too big bulk count string");
10041005
setProtocolError(c,0);
1006+
return REDIS_ERR;
10051007
}
10061008
break;
10071009
}

0 commit comments

Comments
 (0)
Please sign in to comment.