=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/lex/gen.c,v retrieving revision 1.8 retrieving revision 1.9 diff -c -r1.8 -r1.9 *** src/usr.bin/lex/gen.c 2002/05/31 00:56:21 1.8 --- src/usr.bin/lex/gen.c 2002/05/31 22:49:29 1.9 *************** *** 1,4 **** ! /* $OpenBSD: gen.c,v 1.8 2002/05/31 00:56:21 deraadt Exp $ */ /* gen - actual generation (writing) of flex scanners */ --- 1,4 ---- ! /* $OpenBSD: gen.c,v 1.9 2002/05/31 22:49:29 deraadt Exp $ */ /* gen - actual generation (writing) of flex scanners */ *************** *** 28,34 **** * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ ! /* $Header: /cvsrepo/anoncvs/cvs/src/usr.bin/lex/gen.c,v 1.8 2002/05/31 00:56:21 deraadt Exp $ */ #include "flexdef.h" --- 28,34 ---- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ ! /* $Header: /cvsrepo/anoncvs/cvs/src/usr.bin/lex/gen.c,v 1.9 2002/05/31 22:49:29 deraadt Exp $ */ #include "flexdef.h" *************** *** 605,621 **** if ( worry_about_NULs && ! nultrans ) { if ( useecs ) ! (void) sprintf( char_map, "(*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : %d)", NUL_ec ); else ! (void) sprintf( char_map, "(*yy_cp ? YY_SC_TO_UI(*yy_cp) : %d)", NUL_ec ); } else ! strcpy( char_map, useecs ? ! "yy_ec[YY_SC_TO_UI(*yy_cp)]" : "YY_SC_TO_UI(*yy_cp)" ); if ( worry_about_NULs && nultrans ) { --- 605,622 ---- if ( worry_about_NULs && ! nultrans ) { if ( useecs ) ! (void) snprintf( char_map, sizeof char_map, "(*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : %d)", NUL_ec ); else ! (void) snprintf( char_map, sizeof char_map, "(*yy_cp ? YY_SC_TO_UI(*yy_cp) : %d)", NUL_ec ); } else ! strlcpy( char_map, useecs ? ! "yy_ec[YY_SC_TO_UI(*yy_cp)]" : "YY_SC_TO_UI(*yy_cp)", ! sizeof char_map ); if ( worry_about_NULs && nultrans ) { *************** *** 712,718 **** { char NUL_ec_str[20]; ! (void) sprintf( NUL_ec_str, "%d", NUL_ec ); gen_next_compressed_state( NUL_ec_str ); do_indent(); --- 713,719 ---- { char NUL_ec_str[20]; ! (void) snprintf( NUL_ec_str, sizeof NUL_ec_str, "%d", NUL_ec ); gen_next_compressed_state( NUL_ec_str ); do_indent();