mirror of
https://github.com/fluencelabs/redis
synced 2025-03-30 22:31:03 +00:00
Cluster: range checking in getSlotOrReply() fixed.
See issue #1426 on Github.
This commit is contained in:
parent
fb659cd334
commit
25ddefdea3
@ -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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user