diff options
Diffstat (limited to 'src/fnetfilter')
-rw-r--r-- | src/fnetfilter/main.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/fnetfilter/main.c b/src/fnetfilter/main.c index d8b950e8f..34ebf5926 100644 --- a/src/fnetfilter/main.c +++ b/src/fnetfilter/main.c | |||
@@ -79,13 +79,17 @@ static void process_template(char *src, const char *dest) { | |||
79 | *arg_start = '\0'; | 79 | *arg_start = '\0'; |
80 | arg_start++; | 80 | arg_start++; |
81 | if (*arg_start == '\0') { | 81 | if (*arg_start == '\0') { |
82 | fprintf(stderr, "Error fnetfilter: you need to provide at least on argument\n"); | 82 | fprintf(stderr, "Error fnetfilter: you need to provide at least one argument\n"); |
83 | exit(1); | 83 | exit(1); |
84 | } | 84 | } |
85 | 85 | ||
86 | // extract the arguments from command line | 86 | // extract the arguments from command line |
87 | char *token = strtok(arg_start, ","); | 87 | char *token = strtok(arg_start, ","); |
88 | while (token) { | 88 | while (token) { |
89 | if (argcnt == MAXARGS) { | ||
90 | fprintf(stderr, "Error fnetfilter: only up to %u arguments are supported\n", (unsigned) MAXARGS); | ||
91 | exit(1); | ||
92 | } | ||
89 | // look for abnormal things | 93 | // look for abnormal things |
90 | int len = strlen(token); | 94 | int len = strlen(token); |
91 | if (strcspn(token, "\\&!?\"'<>%^(){};,*[]") != (size_t)len) { | 95 | if (strcspn(token, "\\&!?\"'<>%^(){};,*[]") != (size_t)len) { |