Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
44ef1974
Commit
44ef1974
authored
Oct 30, 2018
by
zhaozhao.zz
Committed by
Oran Agra
Sep 01, 2020
Browse files
using proto-max-bulk-len in checkStringLength for SETRANGE and APPEND
(cherry picked from commit
2e69bfe4
)
parent
171f8330
Changes
1
Show whitespace changes
Inline
Side-by-side
src/t_string.c
View file @
44ef1974
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment