diff --git a/src/cfgparse.c b/src/cfgparse.c index 7716b6cd5..2123dd4c5 100644 --- a/src/cfgparse.c +++ b/src/cfgparse.c @@ -1982,6 +1982,7 @@ next_line: while (1) { uint32_t err; const char *errptr; + int check_arg; arg = sizeof(args) / sizeof(*args); outlen = outlinesize; @@ -2064,6 +2065,14 @@ next_line: goto next_line; } + for (check_arg = 0; check_arg < arg; check_arg++) { + if (*args[check_arg]) + continue; + ha_warning("parsing [%s:%d]: argument number %d is empty and marks the end of the argument list; all subsequent arguments will be ignored.\n", + file, linenum, check_arg + 1); + break; + } + /* everything's OK */ break; }