diff --git a/src/cluster.c b/src/cluster.c index dfba1841..8c6c2112 100644 --- a/src/cluster.c +++ b/src/cluster.c @@ -2596,7 +2596,7 @@ int getSlotOrReply(redisClient *c, robj *o) { long long slot; 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"); return -1;