chiark / gitweb /
integer arithmetic types: correct perhaps-possible negative timeout situation
[secnet.git] / conffile.fl
index 27e725d078bb45b60e1404a97fe7e173f46d81aa..b375f3b5851c17a45c673ee06396d430b462fae5 100644 (file)
@@ -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 <assert.h>
+#include <limits.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -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;
 }