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
25ddefde
Commit
25ddefde
authored
Jan 15, 2014
by
antirez
Browse files
Cluster: range checking in getSlotOrReply() fixed.
See issue #1426 on Github.
parent
fb659cd3
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/cluster.c
View file @
25ddefde
...
@@ -2596,7 +2596,7 @@ int getSlotOrReply(redisClient *c, robj *o) {
...
@@ -2596,7 +2596,7 @@ int getSlotOrReply(redisClient *c, robj *o) {
long
long
slot
;
long
long
slot
;
if
(
getLongLongFromObject
(
o
,
&
slot
)
!=
REDIS_OK
||
if
(
getLongLongFromObject
(
o
,
&
slot
)
!=
REDIS_OK
||
slot
<
0
||
slot
>
REDIS_CLUSTER_SLOTS
)
slot
<
0
||
slot
>
=
REDIS_CLUSTER_SLOTS
)
{
{
addReplyError
(
c
,
"Invalid or out of range slot"
);
addReplyError
(
c
,
"Invalid or out of range slot"
);
return
-
1
;
return
-
1
;
...
...
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