Skip to content

Commit

Permalink
Fix integer overflow in zunionInterGenericCommand().
Browse files Browse the repository at this point in the history
This fixes issue redis#761.
  • Loading branch information
antirez committed Nov 22, 2012
1 parent 65606b3 commit cceb0c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/t_zset.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit cceb0c5

Please sign in to comment.