1
0
mirror of https://github.com/fluencelabs/redis synced 2025-06-24 06:21:32 +00:00

Merge pull request from shenlongxing/fix-rename-command

fix empty string for sentinel rename-command
This commit is contained in:
Salvatore Sanfilippo
2018-07-02 18:40:35 +02:00
committed by GitHub

@ -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);