diff options
author | zhaozhao.zz <zhaozhao.zz@alibaba-inc.com> | 2018-10-30 00:38:20 +0800 |
---|---|---|
committer | zhaozhao.zz <276441700@qq.com> | 2020-08-11 18:59:29 +0800 |
commit | 2e69bfe44d154d6739da48ff87f1c66045f68e93 (patch) | |
tree | 4e2fa72c374c4895b480a566e430d91e381243d9 /src | |
parent | 09af8447a1ae479839e75b0743266eaa786f35e1 (diff) | |
download | redis-2e69bfe44d154d6739da48ff87f1c66045f68e93.tar.gz |
using proto-max-bulk-len in checkStringLength for SETRANGE and APPEND
Diffstat (limited to 'src')
-rw-r--r-- | src/t_string.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; |