#define RETURNNAME \
if(yyleng < MAXLINE) \
{ \
- strcpy( nmstr, yytext ); \
+ strncpy( nmstr, yytext, sizeof(nmstr) ); \
return NAME; \
} \
else \
^{NAME} {
if(yyleng < MAXLINE)
{
- strcpy( nmstr, yytext );
+ strncpy( nmstr, yytext, sizeof(nmstr) );
}
else
{
{NOT_WS}[^\r\n]* {
if(yyleng < MAXLINE)
{
- strcpy( nmdef, yytext );
+ strncpy( nmdef, yytext, sizeof(nmdef) );
}
else
{
\"[^"\n]*\" {
if(yyleng-1 < MAXLINE)
{
- strcpy( nmstr, yytext + 1 );
+ strncpy( nmstr, yytext + 1, sizeof(nmstr) );
}
else
{
if(yyleng < MAXLINE)
{
- strcpy( nmstr, yytext );
+ strncpy( nmstr, yytext, sizeof(nmstr) );
}
else
{
if(yyleng-1 < MAXLINE)
{
- strcpy( nmstr, yytext + 1 );
+ strncpy( nmstr, yytext + 1, sizeof(nmstr) );
}
else
{