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
484a1ad6
Unverified
Commit
484a1ad6
authored
Oct 11, 2021
by
zhaozhao.zz
Committed by
GitHub
Oct 11, 2021
Browse files
master client should ignore proto_max_bulk_len in bitops (#9626)
parent
7ff7536e
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/bitops.c
View file @
484a1ad6
...
@@ -429,7 +429,7 @@ int getBitOffsetFromArgument(client *c, robj *o, uint64_t *offset, int hash, int
...
@@ -429,7 +429,7 @@ int getBitOffsetFromArgument(client *c, robj *o, uint64_t *offset, int hash, int
if
(
usehash
)
loffset
*=
bits
;
if
(
usehash
)
loffset
*=
bits
;
/* Limit offset to server.proto_max_bulk_len (512MB in bytes by default) */
/* Limit offset to server.proto_max_bulk_len (512MB in bytes by default) */
if
(
(
loffset
<
0
)
||
(
loffset
>>
3
)
>=
server
.
proto_max_bulk_len
)
if
(
loffset
<
0
||
(
!
(
c
->
flags
&
CLIENT_MASTER
)
&&
(
loffset
>>
3
)
>=
server
.
proto_max_bulk_len
)
)
{
{
addReplyError
(
c
,
err
);
addReplyError
(
c
,
err
);
return
C_ERR
;
return
C_ERR
;
...
...
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