Commit 44ef1974 authored by zhaozhao.zz's avatar zhaozhao.zz Committed by Oran Agra
Browse files

using proto-max-bulk-len in checkStringLength for SETRANGE and APPEND

(cherry picked from commit 2e69bfe4)
parent 171f8330
...@@ -35,8 +35,8 @@ ...@@ -35,8 +35,8 @@
*----------------------------------------------------------------------------*/ *----------------------------------------------------------------------------*/
static int checkStringLength(client *c, long long size) { static int checkStringLength(client *c, long long size) {
if (size > 512*1024*1024) { if (!(c->flags & CLIENT_MASTER) && size > server.proto_max_bulk_len) {
addReplyError(c,"string exceeds maximum allowed size (512MB)"); addReplyError(c,"string exceeds maximum allowed size (proto-max-bulk-len)");
return C_ERR; return C_ERR;
} }
return C_OK; return C_OK;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment