mirror of
https://github.com/fluencelabs/redis
synced 2025-06-13 01:01:22 +00:00
Prevent clients from making too large multibulk requests
This commit is contained in:
@ -724,6 +724,10 @@ int processMultibulkBuffer(redisClient *c) {
|
||||
if (c->multibulklen <= 0) {
|
||||
c->querybuf = sdsrange(c->querybuf,pos,-1);
|
||||
return REDIS_OK;
|
||||
} else if (c->multibulklen > 1024*1024) {
|
||||
addReplyError(c,"Protocol error: invalid multibulk length");
|
||||
setProtocolError(c,pos);
|
||||
return REDIS_ERR;
|
||||
}
|
||||
|
||||
/* Setup argv array on client structure */
|
||||
|
Reference in New Issue
Block a user