ircd_lexer: fix another crash with the same cause

This commit is contained in:
Aaron Jones 2016-05-15 00:54:26 +00:00
parent f55078bdc7
commit 828fe03888
No known key found for this signature in database
GPG key ID: 6E854C0FAAD4CEA4
2 changed files with 3 additions and 3 deletions

View file

@ -98,7 +98,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
@ -138,7 +138,7 @@ include \.include{ws}(\<.*\>|\".*\")
loadmodule { return LOADMODULE; }
{string} {
strcpy(yylval.string, yytext);
rb_strlcpy(yylval.string, yytext, 1024);
yylval.string[yyleng] = '\0';
return STRING;
}

View file

@ -164,7 +164,7 @@ static void add_cur_list(int type, char *str, int number)
%union {
int number;
char string[IRCD_BUFSIZE + 1];
char string[1024];
conf_parm_t * conf_parm;
}