fix empty string for sentinel rename-command

This commit is contained in:
shenlongxing 2018-06-28 01:08:55 +08:00
parent 345b4809f4
commit 3c27db1cd9

View File

@ -3482,6 +3482,11 @@ void sentinelSetCommand(client *c) {
sds oldname = c->argv[++j]->ptr;
sds newname = c->argv[++j]->ptr;
if ((sdslen(oldname) == 0) || (sdslen(newname) == 0)) {
badarg = sdslen(newname) ? j-1 : j;
goto badfmt;
}
/* Remove any older renaming for this command. */
dictDelete(ri->renamed_commands,oldname);