diff options
author | Jan Engelhardt <jengelh@medozas.de> | 2010-06-07 11:50:25 +0200 |
---|---|---|
committer | Jan Engelhardt <jengelh@medozas.de> | 2010-06-07 11:56:07 +0200 |
commit | 0cb675b8f18c4b074d4c69461638820708e98100 (patch) | |
tree | 25cf2323eb2d272755b098d29edbb7ef7ede4335 /ip6tables.c | |
parent | 491c1660fced08e2d1a08c101c63af04250275d0 (diff) |
xtables: another try at chain name length checking
Since XT_EXTENSION_MAXNAMELEN is now available, make use of it
and clear the confusion.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Diffstat (limited to 'ip6tables.c')
-rw-r--r-- | ip6tables.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ip6tables.c b/ip6tables.c index 4e73d34e..2fff21bf 100644 --- a/ip6tables.c +++ b/ip6tables.c @@ -456,10 +456,10 @@ parse_target(const char *targetname) xtables_error(PARAMETER_PROBLEM, "Invalid target name (too short)"); - if (strlen(targetname) > XT_FUNCTION_MAXNAMELEN - 1) + if (strlen(targetname) >= XT_EXTENSION_MAXNAMELEN) xtables_error(PARAMETER_PROBLEM, "Invalid target name `%s' (%u chars max)", - targetname, XT_FUNCTION_MAXNAMELEN - 1); + targetname, XT_EXTENSION_MAXNAMELEN - 1); for (ptr = targetname; *ptr; ptr++) if (isspace(*ptr)) |