Commit 25ddefde authored by antirez's avatar antirez
Browse files

Cluster: range checking in getSlotOrReply() fixed.

See issue #1426 on Github.
parent fb659cd3
...@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment