From 59d72e349a19da49d22934c1cdab914c3087c702 Mon Sep 17 00:00:00 2001 From: Jozsef Kadlecsik Date: Tue, 19 Jun 2012 22:06:59 +0200 Subject: The commandline parser was too permissive, make it more strict The parser allowed more possible argument alternatives for command options than the documented one, which limited the possibility of other option names. The patch makes the parser more strict. --- include/libipset/ui.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include/libipset') diff --git a/include/libipset/ui.h b/include/libipset/ui.h index aa3979f..78d5866 100644 --- a/include/libipset/ui.h +++ b/include/libipset/ui.h @@ -10,11 +10,13 @@ #include /* bool */ #include /* enum ipset_cmd */ +#define IPSET_CMD_ALIASES 3 + /* Commands in userspace */ struct ipset_commands { enum ipset_cmd cmd; int has_arg; - const char *name[2]; + const char *name[IPSET_CMD_ALIASES]; const char *help; }; -- cgit v1.2.3