summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/t_string.c4
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;