diff options
Diffstat (limited to 'games/tetris')
-rw-r--r-- | games/tetris/scores.c | 4 | ||||
-rw-r--r-- | games/tetris/tetris.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/games/tetris/scores.c b/games/tetris/scores.c index 2afcfe4b36c..affbe22e7c3 100644 --- a/games/tetris/scores.c +++ b/games/tetris/scores.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scores.c,v 1.7 2002/05/31 04:21:30 pjanzen Exp $ */ +/* $OpenBSD: scores.c,v 1.8 2003/04/06 18:50:38 deraadt Exp $ */ /* $NetBSD: scores.c,v 1.2 1995/04/22 07:42:38 cgd Exp $ */ /*- @@ -193,7 +193,7 @@ savescore(level) break; } if (i >= nscores) { - strcpy(sp->hs_name, me); + strlcpy(sp->hs_name, me, sizeof sp->hs_name); sp->hs_level = level; sp->hs_score = score; sp->hs_time = now; diff --git a/games/tetris/tetris.c b/games/tetris/tetris.c index 59b89f2a355..88d33187b87 100644 --- a/games/tetris/tetris.c +++ b/games/tetris/tetris.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tetris.c,v 1.15 2002/12/06 21:48:51 millert Exp $ */ +/* $OpenBSD: tetris.c,v 1.16 2003/04/06 18:50:38 deraadt Exp $ */ /* $NetBSD: tetris.c,v 1.2 1995/04/22 07:42:47 cgd Exp $ */ /*- @@ -210,7 +210,7 @@ main(argc, argv) } } - sprintf(key_msg, + snprintf(key_msg, sizeof key_msg, "%s - left %s - rotate %s - right %s - drop %s - pause %s - quit", key_write[0], key_write[1], key_write[2], key_write[3], key_write[4], key_write[5]); |