summaryrefslogtreecommitdiff
path: root/usr.bin/lex/initscan.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/lex/initscan.c')
-rw-r--r--usr.bin/lex/initscan.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/usr.bin/lex/initscan.c b/usr.bin/lex/initscan.c
index 80fe2171fde..6cf3e210306 100644
--- a/usr.bin/lex/initscan.c
+++ b/usr.bin/lex/initscan.c
@@ -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: /cvs/OpenBSD/src/usr.bin/lex/initscan.c,v 1.8 2002/05/31 00:56:21 deraadt Exp $
+ * $Header: /cvs/OpenBSD/src/usr.bin/lex/initscan.c,v 1.9 2002/05/31 22:49:29 deraadt Exp $
*/
#define FLEX_SCANNER
@@ -1272,7 +1272,7 @@ char *yytext;
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
-/* $Header: /cvs/OpenBSD/src/usr.bin/lex/initscan.c,v 1.8 2002/05/31 00:56:21 deraadt Exp $ */
+/* $Header: /cvs/OpenBSD/src/usr.bin/lex/initscan.c,v 1.9 2002/05/31 22:49:29 deraadt Exp $ */
#include "flexdef.h"
#include "parse.h"
@@ -1294,7 +1294,7 @@ char *yytext;
return CHAR;
#define RETURNNAME \
- strcpy( nmstr, yytext ); \
+ strlcpy( nmstr, yytext, sizeof nmstr ); \
return NAME;
#define PUT_BACK_STRING(str, start) \
@@ -1667,7 +1667,7 @@ case 15:
YY_RULE_SETUP
#line 138 "scan.l"
{
- strcpy( nmstr, yytext );
+ strlcpy( nmstr, yytext, sizeof nmstr );
didadef = false;
BEGIN(PICKUPDEF);
}
@@ -1768,7 +1768,7 @@ case 31:
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 @@ case 80:
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 @@ YY_RULE_SETUP
{
int cclval;
- strcpy( nmstr, yytext );
+ strlcpy( nmstr, yytext, sizeof nmstr );
/* Check to see if we've already encountered this
* ccl.
@@ -2295,7 +2295,7 @@ YY_RULE_SETUP
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 )