From: Phil Sutter Date: Fri, 21 Jul 2023 18:14:09 +0000 (+0200) Subject: *tables: Reject invalid chain names when renaming X-Git-Tag: v1.8.10~42 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=344e9b260ba2bbbdd0c32f112273fd552d0b73f4;p=thirdparty%2Fiptables.git *tables: Reject invalid chain names when renaming While given chain name was sanity checked with --new-chain command, --rename-chain command allowed to choose an invalid name. Keep things consistent by adding the missing check. Fixes: e6869a8f59d77 ("reorganized tree after kernel merge") Signed-off-by: Phil Sutter --- diff --git a/iptables/xshared.c b/iptables/xshared.c index 28c65fae..5f75a0a5 100644 --- a/iptables/xshared.c +++ b/iptables/xshared.c @@ -1511,6 +1511,7 @@ void do_parse(int argc, char *argv[], "-%c requires old-chain-name and " "new-chain-name", cmd2char(CMD_RENAME_CHAIN)); + assert_valid_chain_name(p->newname); break; case 'P':