summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 6ba752b1..1cc8b39f 100644
--- a/src/main.c
+++ b/src/main.c
@@ -288,7 +288,12 @@ int main(int argc, char * const *argv)
include_paths[num_include_paths++] = optarg;
break;
case OPT_NUMERIC:
- numeric_output++;
+ if (++numeric_output > NUMERIC_ALL) {
+ fprintf(stderr, "Too many numeric options "
+ "used, max. %u\n",
+ NUMERIC_ALL);
+ exit(NFT_EXIT_FAILURE);
+ }
break;
case OPT_STATELESS:
stateless_output++;