Cluster: range checking in getSlotOrReply() fixed.

See issue #1426 on Github.
This commit is contained in:
antirez 2014-01-15 11:33:41 +01:00
parent fb659cd334
commit 25ddefdea3

View File

@ -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;