summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Janzen <pjanzen@cvs.openbsd.org>1999-03-26 03:16:11 +0000
committerPaul Janzen <pjanzen@cvs.openbsd.org>1999-03-26 03:16:11 +0000
commit818585d7e5830c7105190e5bc04ab8e3e40221b9 (patch)
treebb37e9b0c6c240af05c8569b2f2da3edab6b23df
parent0c8b4d3543c98c9bd92b8b0556004f77fc33bdfb (diff)
Buffer overflow fix (from FreeBSD)
-rw-r--r--games/fish/fish.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/games/fish/fish.c b/games/fish/fish.c
index b1a26cc25aa..3c4ad7e2d19 100644
--- a/games/fish/fish.c
+++ b/games/fish/fish.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fish.c,v 1.3 1998/08/22 09:11:31 pjanzen Exp $ */
+/* $OpenBSD: fish.c,v 1.4 1999/03/26 03:16:10 pjanzen Exp $ */
/* $NetBSD: fish.c,v 1.3 1995/03/23 08:28:18 cgd Exp $ */
/*-
@@ -47,7 +47,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)fish.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$OpenBSD: fish.c,v 1.3 1998/08/22 09:11:31 pjanzen Exp $";
+static char rcsid[] = "$OpenBSD: fish.c,v 1.4 1999/03/26 03:16:10 pjanzen Exp $";
#endif
#endif /* not lint */
@@ -164,7 +164,7 @@ usermove()
for (;;) {
(void)printf("You ask me for: ");
(void)fflush(stdout);
- if (fgets(buf, BUFSIZ, stdin) == NULL)
+ if (fgets(buf, sizeof(buf), stdin) == NULL)
exit(0);
if (buf[0] == '\0')
continue;