Commit 5dc4fe15 authored by Itamar Haber's avatar Itamar Haber Committed by GitHub
Browse files

Verify pairs are provided after subcommands

Fixes https://github.com/antirez/redis/issues/3639
parent 6eb0c52d
......@@ -1521,7 +1521,7 @@ void zaddGenericCommand(client *c, int flags) {
/* After the options, we expect to have an even number of args, since
* we expect any number of score-element pairs. */
elements = c->argc-scoreidx;
if (elements % 2) {
if (elements % 2 || !elements) {
addReply(c,shared.syntaxerr);
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