diff options
author | John Millaway <john43@users.sourceforge.net> | 2006-03-22 12:49:41 +0000 |
---|---|---|
committer | John Millaway <john43@users.sourceforge.net> | 2006-03-22 12:49:41 +0000 |
commit | a6b8c36a85314758aae83a910b4e3cfea8560376 (patch) | |
tree | d9a3b46130bdddf3153cf886783ebc77acee11ed /parse.y | |
parent | c0378216160146ce38242f8a2242d59928f293f8 (diff) |
Replaced sprintf with snprintf everywhere.
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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 ); } } |