From 2e69bfe44d154d6739da48ff87f1c66045f68e93 Mon Sep 17 00:00:00 2001 From: "zhaozhao.zz" Date: Tue, 30 Oct 2018 00:38:20 +0800 Subject: using proto-max-bulk-len in checkStringLength for SETRANGE and APPEND --- src/t_string.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/t_string.c b/src/t_string.c index 259f43142..4be758e65 100644 --- a/src/t_string.c +++ b/src/t_string.c @@ -35,8 +35,8 @@ *----------------------------------------------------------------------------*/ static int checkStringLength(client *c, long long size) { - if (size > 512*1024*1024) { - addReplyError(c,"string exceeds maximum allowed size (512MB)"); + if (!(c->flags & CLIENT_MASTER) && size > server.proto_max_bulk_len) { + addReplyError(c,"string exceeds maximum allowed size (proto-max-bulk-len)"); return C_ERR; } return C_OK; -- cgit v1.2.1