=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/lex/Attic/initscan.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- src/usr.bin/lex/Attic/initscan.c 2002/05/31 00:56:21 1.8 +++ src/usr.bin/lex/Attic/initscan.c 2002/05/31 22:49:29 1.9 @@ -1,10 +1,10 @@ -/* $OpenBSD: initscan.c,v 1.8 2002/05/31 00:56:21 deraadt Exp $ */ +/* $OpenBSD: initscan.c,v 1.9 2002/05/31 22:49:29 deraadt Exp $ */ #line 2 "scan.c" /* A lexical scanner generated by flex */ /* Scanner skeleton version: - * $Header: /cvsrepo/anoncvs/cvs/src/usr.bin/lex/Attic/initscan.c,v 1.8 2002/05/31 00:56:21 deraadt Exp $ + * $Header: /cvsrepo/anoncvs/cvs/src/usr.bin/lex/Attic/initscan.c,v 1.9 2002/05/31 22:49:29 deraadt Exp $ */ #define FLEX_SCANNER @@ -1272,7 +1272,7 @@ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -/* $Header: /cvsrepo/anoncvs/cvs/src/usr.bin/lex/Attic/initscan.c,v 1.8 2002/05/31 00:56:21 deraadt Exp $ */ +/* $Header: /cvsrepo/anoncvs/cvs/src/usr.bin/lex/Attic/initscan.c,v 1.9 2002/05/31 22:49:29 deraadt Exp $ */ #include "flexdef.h" #include "parse.h" @@ -1294,7 +1294,7 @@ return CHAR; #define RETURNNAME \ - strcpy( nmstr, yytext ); \ + strlcpy( nmstr, yytext, sizeof nmstr ); \ return NAME; #define PUT_BACK_STRING(str, start) \ @@ -1667,7 +1667,7 @@ YY_RULE_SETUP #line 138 "scan.l" { - strcpy( nmstr, yytext ); + strlcpy( nmstr, yytext, sizeof nmstr ); didadef = false; BEGIN(PICKUPDEF); } @@ -1768,7 +1768,7 @@ YY_RULE_SETUP #line 186 "scan.l" { - strcpy( (char *) nmdef, yytext ); + strlcpy( (char *) nmdef, yytext, sizeof nmdef ); /* Skip trailing whitespace. */ for ( i = strlen( (char *) nmdef ) - 1; @@ -2046,7 +2046,7 @@ YY_RULE_SETUP #line 279 "scan.l" { - strcpy( nmstr, yytext + 1 ); + strlcpy( nmstr, yytext + 1, sizeof nmstr ); nmstr[strlen( nmstr ) - 1] = '\0'; return NAME; } @@ -2257,7 +2257,7 @@ { int cclval; - strcpy( nmstr, yytext ); + strlcpy( nmstr, yytext, sizeof nmstr ); /* Check to see if we've already encountered this * ccl. @@ -2295,7 +2295,7 @@ Char *nmdefptr; Char *ndlookup(); - strcpy( nmstr, yytext + 1 ); + strlcpy( nmstr, yytext + 1, sizeof nmstr ); nmstr[yyleng - 2] = '\0'; /* chop trailing brace */ if ( (nmdefptr = ndlookup( nmstr )) == 0 )