summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authorJohn Millaway <john43@users.sourceforge.net>2006-03-22 12:49:41 +0000
committerJohn Millaway <john43@users.sourceforge.net>2006-03-22 12:49:41 +0000
commita6b8c36a85314758aae83a910b4e3cfea8560376 (patch)
treed9a3b46130bdddf3153cf886783ebc77acee11ed /parse.y
parentc0378216160146ce38242f8a2242d59928f293f8 (diff)
Replaced sprintf with snprintf everywhere.
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y10
1 files changed, 5 insertions, 5 deletions
diff --git a/parse.y b/parse.y
index c40d75b..0f56e04 100644
--- a/parse.y
+++ b/parse.y
@@ -930,7 +930,7 @@ void build_eof_action()
else
{
sceof[scon_stk[i]] = true;
- sprintf( action_text, "case YY_STATE_EOF(%s):\n",
+ snprintf( action_text, sizeof(action_text), "case YY_STATE_EOF(%s):\n",
scname[scon_stk[i]] );
add_action( action_text );
}
@@ -955,7 +955,7 @@ const char *msg, arg[];
{
char errmsg[MAXLINE];
- (void) sprintf( errmsg, msg, arg );
+ (void) snprintf( errmsg, sizeof(errmsg), msg, arg );
synerr( errmsg );
}
@@ -977,7 +977,7 @@ const char *msg, arg[];
{
char warn_msg[MAXLINE];
- (void) sprintf( warn_msg, msg, arg );
+ snprintf( warn_msg, sizeof(warn_msg), msg, arg );
warn( warn_msg );
}
@@ -999,7 +999,7 @@ const char *msg, arg[];
{
char errmsg[MAXLINE];
- (void) sprintf( errmsg, msg, arg );
+ snprintf( errmsg, sizeof(errmsg), msg, arg );
pinpoint_message( errmsg );
}
@@ -1023,7 +1023,7 @@ int line;
if ( ! nowarn )
{
- sprintf( warning, "warning, %s", str );
+ snprintf( warning, sizeof(warning), "warning, %s", str );
line_pinpoint( warning, line );
}
}