X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=conffile.fl;h=2cfa21b10f96202635e8d33431802d136a6ca791;hb=16f73fa6cc7426276bc4bd0cc8537d08c64cbc83;hp=27e725d078bb45b60e1404a97fe7e173f46d81aa;hpb=fe5e9cc422cd72526ccfceffbc7e5af8ac83b407;p=secnet.git 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; }