Commit cceb0c5b authored by antirez's avatar antirez
Browse files

Fix integer overflow in zunionInterGenericCommand().

This fixes issue #761.
parent 65606b3b
...@@ -1497,7 +1497,7 @@ void zunionInterGenericCommand(redisClient *c, robj *dstkey, int op) { ...@@ -1497,7 +1497,7 @@ void zunionInterGenericCommand(redisClient *c, robj *dstkey, int op) {
} }
/* test if the expected number of keys would overflow */ /* test if the expected number of keys would overflow */
if (3+setnum > c->argc) { if (setnum > c->argc-3) {
addReply(c,shared.syntaxerr); addReply(c,shared.syntaxerr);
return; return;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment