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/backgammon | |
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/backgammon')
-rw-r--r-- | games/backgammon/common_source/board.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/games/backgammon/common_source/board.c b/games/backgammon/common_source/board.c index fa5dfe7c3ca..4d299bfd238 100644 --- a/games/backgammon/common_source/board.c +++ b/games/backgammon/common_source/board.c @@ -1,4 +1,4 @@ -/* $OpenBSD: board.c,v 1.5 2001/06/23 23:50:03 pjanzen Exp $ */ +/* $OpenBSD: board.c,v 1.6 2003/04/06 18:50:36 deraadt Exp $ */ /* * Copyright (c) 1980, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)board.c 8.1 (Berkeley) 5/31/93"; #else -static char rcsid[] = "$OpenBSD: board.c,v 1.5 2001/06/23 23:50:03 pjanzen Exp $"; +static char rcsid[] = "$OpenBSD: board.c,v 1.6 2003/04/06 18:50:36 deraadt Exp $"; #endif #endif /* not lint */ @@ -61,7 +61,7 @@ wrboard() goto lastline; addstr("_____________________________________________________\n"); addstr(bl); - strcpy(ln, bl); + strlcpy(ln, bl, sizeof ln); for (j = 1; j < 50; j += 4) { k = j / 4 + (j > 24 ? 12 : 13); ln[j + 1] = k % 10 + '0'; @@ -71,7 +71,7 @@ wrboard() } addstr(ln); for (i = 0; i < 5; i++) { - strcpy(ln, sv); + strlcpy(ln, sv, sizeof ln); for (j = 1; j < 50; j += 4) { k = j / 4 + (j > 24 ? 12 : 13); wrbsub(); @@ -101,12 +101,12 @@ wrboard() ln[l] = '\0'; addstr(ln); } - strcpy(ln, bl); + strlcpy(ln, bl, sizeof ln); ln[25] = 'B'; ln[26] = 'A'; ln[27] = 'R'; addstr(ln); - strcpy(ln, sv); + strlcpy(ln, sv, sizeof ln); for (i = 4; i > -1; i--) { for (j = 1; j < 50; j += 4) { k = ((j > 24 ? 53 : 49) - j) / 4; @@ -137,7 +137,7 @@ wrboard() ln[l] = '\0'; addstr(ln); } - strcpy(ln, bl); + strlcpy(ln, bl, sizeof ln); for (j = 1; j < 50; j += 4) { k = ((j > 24 ? 53 : 49) - j) / 4; ln[j + 1] = k % 10 + '0'; |