diff options
Diffstat (limited to 'ip6tables-restore.c')
-rw-r--r-- | ip6tables-restore.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ip6tables-restore.c b/ip6tables-restore.c index d0efbeed..f0725d1e 100644 --- a/ip6tables-restore.c +++ b/ip6tables-restore.c @@ -253,6 +253,12 @@ int main(int argc, char *argv[]) exit(1); } + if (strlen(chain) > XT_FUNCTION_MAXNAMELEN - 1) + xtables_error(PARAMETER_PROBLEM, + "Invalid chain name `%s' " + "(%u chars max)", + chain, XT_FUNCTION_MAXNAMELEN - 1); + if (ip6tc_builtin(chain, handle) <= 0) { if (noflush && ip6tc_is_chain(chain, handle)) { DEBUGP("Flushing existing user defined chain '%s'\n", chain); |