mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-23 08:38:27 -05:00
fix empty string for sentinel rename-command
This commit is contained in:
parent
345b4809f4
commit
3c27db1cd9
@ -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…
Reference in New Issue
Block a user