From f573b23187fadb0d179607c09f4f5eeba3aa5559 Mon Sep 17 00:00:00 2001 From: "zhaozhao.zz" Date: Tue, 30 Oct 2018 00:50:36 +0800 Subject: [PATCH] CLIENT_MASTER should ignore server.proto_max_bulk_len (cherry picked from commit 0061dbba04918b3f62f943f469f41590d4200919) --- src/networking.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/networking.c b/src/networking.c index a3c04efa6..aa42c43e9 100644 --- a/src/networking.c +++ b/src/networking.c @@ -1691,7 +1691,8 @@ int processMultibulkBuffer(client *c) { } ok = string2ll(c->querybuf+c->qb_pos+1,newline-(c->querybuf+c->qb_pos+1),&ll); - if (!ok || ll < 0 || ll > server.proto_max_bulk_len) { + if (!ok || ll < 0 || + (!(c->flags & CLIENT_MASTER) && ll > server.proto_max_bulk_len)) { addReplyError(c,"Protocol error: invalid bulk length"); setProtocolError("invalid bulk length",c); return C_ERR;