]> jfr.im git - solanum.git/blobdiff - ircd/ircd_lexer.l
Track and inform modules of privset changes
[solanum.git] / ircd / ircd_lexer.l
index 7112cc30094b3a784e78507b8bc8a6c7152765b8..46514cbfd9b23435e28f7cb42f2c26214fcb8036 100644 (file)
@@ -58,7 +58,7 @@ char *current_file = conffilebuf;
 
 FILE *inc_fbfile_in[MAX_INCLUDE_DEPTH];
 
-char linebuf[512];
+char yy_linebuf[16384];
 
 #undef YY_INPUT
 
@@ -79,7 +79,7 @@ include   \.include{ws}(\<.*\>|\".*\")
 %%
 {include}       { cinclude(); }
 "/*"            { ccomment(); }
-\n.*            { strcpy(linebuf, yytext+1); lineno++; yyless(1); }
+\n.*            { rb_strlcpy(yy_linebuf, yytext+1, sizeof(yy_linebuf)); lineno++; yyless(1); }
 
 {ws}            ;
 {comment}       { hashcomment(); }
@@ -94,7 +94,7 @@ include   \.include{ws}(\<.*\>|\".*\")
                     }
                   else
                     {
-                      strcpy(yylval.string, yytext + 1);
+                      rb_strlcpy(yylval.string, yytext + 1, 1024);
                       if(yylval.string[yyleng-2] != '"')
                         ilog(L_MAIN, "Unterminated character string");
                       else
@@ -134,7 +134,7 @@ include   \.include{ws}(\<.*\>|\".*\")
 
 loadmodule     { return LOADMODULE; }
 {string}        {
-                 strcpy(yylval.string, yytext);
+                 rb_strlcpy(yylval.string, yytext, 1024);
                   yylval.string[yyleng] = '\0';
                   return STRING;
                 }
@@ -251,6 +251,6 @@ void hashcomment(void)
   if (strlen(yytext) < sizeof(INCLUDE) - 1)
     return;
 
-  if (!strncasecmp(yytext, INCLUDE, sizeof(INCLUDE) - 1))
+  if (!rb_strncasecmp(yytext, INCLUDE, sizeof(INCLUDE) - 1))
       yyerror("You probably meant '.include', skipping");
 }