mirror of
https://github.com/fluencelabs/redis
synced 2025-06-14 01:31:21 +00:00
Verify pairs are provided after subcommands
Fixes https://github.com/antirez/redis/issues/3639
This commit is contained in:
@ -1247,7 +1247,7 @@ void zaddGenericCommand(client *c, int flags) {
|
|||||||
/* After the options, we expect to have an even number of args, since
|
/* After the options, we expect to have an even number of args, since
|
||||||
* we expect any number of score-element pairs. */
|
* we expect any number of score-element pairs. */
|
||||||
elements = c->argc-scoreidx;
|
elements = c->argc-scoreidx;
|
||||||
if (elements % 2) {
|
if (elements % 2 || !elements) {
|
||||||
addReply(c,shared.syntaxerr);
|
addReply(c,shared.syntaxerr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user