diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-04-06 18:50:39 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-04-06 18:50:39 +0000 |
commit | 0f64621783b3f46a4851826b9f4284e3c9dbeb61 (patch) | |
tree | 352fcb09d9321309ec519dc3144147a24bd64bda /games/phantasia/convert.c | |
parent | 997f28507be542389b846c45806474af6bbfdedc (diff) |
2451 lines of strdup/sprintf/strcpy whacking. mostly ok'd by pjanzen
already, but he may have later changes to make still.
Diffstat (limited to 'games/phantasia/convert.c')
-rw-r--r-- | games/phantasia/convert.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/games/phantasia/convert.c b/games/phantasia/convert.c index 141d7f808eb..53b247c3a5e 100644 --- a/games/phantasia/convert.c +++ b/games/phantasia/convert.c @@ -1,4 +1,4 @@ -/* $OpenBSD: convert.c,v 1.4 2002/12/06 21:48:51 millert Exp $ */ +/* $OpenBSD: convert.c,v 1.5 2003/04/06 18:50:38 deraadt Exp $ */ /* $NetBSD: convert.c,v 1.2 1995/03/24 03:58:34 cgd Exp $ */ /* @@ -166,9 +166,12 @@ FILE *oldcharac, *newcharac; /* to open old and new files */ Newplayer.p_virgin = Oldplayer.o_virgin; Newplayer.p_blindness = Oldplayer.o_blindness; - strcpy(Newplayer.p_name, Oldplayer.o_name); - strcpy(Newplayer.p_password, Oldplayer.o_password); - strcpy(Newplayer.p_login, Oldplayer.o_login); + strlcpy(Newplayer.p_name, Oldplayer.o_name, + sizeof Newplayer.p_name); + strlcpy(Newplayer.p_password, Oldplayer.o_password, + sizeof Newplayer.p_password); + strlcpy(Newplayer.p_login, Oldplayer.o_login, + sizeof Newplayer.p_login); /* write new structure */ fwrite((char *) &Newplayer, sizeof(Newplayer), 1, newcharac); |