Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
2e69bfe4
Commit
2e69bfe4
authored
Oct 30, 2018
by
zhaozhao.zz
Committed by
zhaozhao.zz
Aug 11, 2020
Browse files
using proto-max-bulk-len in checkStringLength for SETRANGE and APPEND
parent
09af8447
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/t_string.c
View file @
2e69bfe4
...
@@ -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
;
...
...
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