From 25ddefdea300958f356365ab8830a9676193df70 Mon Sep 17 00:00:00 2001 From: antirez Date: Wed, 15 Jan 2014 11:33:41 +0100 Subject: [PATCH] Cluster: range checking in getSlotOrReply() fixed. See issue #1426 on Github. --- src/cluster.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;