X-Git-Url: https://git.distorted.org.uk/~mdw/secnet/blobdiff_plain/fe5e9cc422cd72526ccfceffbc7e5af8ac83b407..c27ca22fe83cb7b8ddbf16c46fbcf2b0be659075:/conffile.fl diff --git a/conffile.fl b/conffile.fl index 27e725d..2cfa21b 100644 --- a/conffile.fl +++ b/conffile.fl @@ -1,7 +1,13 @@ /* the "incl" state is used for picking up the name of an include file */ %x incl +%option nounput +%option noinput +%option never-interactive + %{ +#include +#include #include #include #include @@ -29,7 +35,7 @@ struct include_stack_item { struct include_stack_item include_stack[MAX_INCLUDE_DEPTH]; int include_stack_ptr=0; -uint32_t config_lineno=0; +int config_lineno=0; cstring_t config_file="xxx"; static struct p_node *leafnode(uint32_t type) @@ -96,6 +102,7 @@ include BEGIN(incl); Message(M_FATAL,"config file %s line %d: %s\n",config_file, config_lineno,"``include'' requires a filename"); BEGIN(INITIAL); + assert(config_lineno < INT_MAX); ++config_lineno; ++yynerrs; }