mirror of
https://github.com/fluencelabs/redis
synced 2025-03-20 09:30:55 +00:00
Merge pull request #5068 from shenlongxing/fix-rename-command
fix empty string for sentinel rename-command
This commit is contained in:
commit
f03ad96236
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user