Permalink
Browse files

Fix integer overflow in zunionInterGenericCommand().

This fixes issue #761.
  • Loading branch information...
antirez committed Nov 22, 2012
1 parent ca9321a commit cc85ed41df125862603f05870230b43accf455eb
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/t_zset.c
View
@@ -1497,7 +1497,7 @@ void zunionInterGenericCommand(redisClient *c, robj *dstkey, int op) {
}
/* test if the expected number of keys would overflow */
- if (3+setnum > c->argc) {
+ if (setnum > c->argc-3) {
addReply(c,shared.syntaxerr);
return;
}

0 comments on commit cc85ed4

Please sign in to comment.