diff options
author | antirez <antirez@gmail.com> | 2014-04-23 10:19:43 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2014-04-23 10:21:26 +0200 |
commit | 35252037fdf0891b78a2a96d2d9899740ee88bbf (patch) | |
tree | 379af558767610168db42b5093cf0bdce37338ee | |
parent | de7ebf83e157cfd793303e6457c9d6e0bf2afa6b (diff) | |
download | redis-35252037fdf0891b78a2a96d2d9899740ee88bbf.tar.gz |
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.
-rw-r--r-- | src/networking.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/networking.c b/src/networking.c index 17d22f29b..81b66f914 100644 --- a/src/networking.c +++ b/src/networking.c @@ -977,8 +977,10 @@ int processMultibulkBuffer(redisClient *c) { newline = strchr(c->querybuf+pos,'\r'); if (newline == NULL) { 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); + return REDIS_ERR; } break; } |