diff options
author | David Leonard <d@cvs.openbsd.org> | 1999-12-12 14:54:00 +0000 |
---|---|---|
committer | David Leonard <d@cvs.openbsd.org> | 1999-12-12 14:54:00 +0000 |
commit | 00cefc6ae8f1dc06821302e84c3398940f564bf5 (patch) | |
tree | 6c54b762f08b1e6277374349f2c3cd05be46f46f /games | |
parent | 6dee7fa4cf14374061d29daab5809a32f3c523c5 (diff) |
clear an array before filling. reviewed by pjanzen@
Diffstat (limited to 'games')
-rw-r--r-- | games/hunt/hunt/connect.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/games/hunt/hunt/connect.c b/games/hunt/hunt/connect.c index 06309e681f6..f1bdffffc72 100644 --- a/games/hunt/hunt/connect.c +++ b/games/hunt/hunt/connect.c @@ -1,4 +1,4 @@ -/* $OpenBSD: connect.c,v 1.4 1999/02/01 06:53:55 d Exp $ */ +/* $OpenBSD: connect.c,v 1.5 1999/12/12 14:53:59 d Exp $ */ /* $NetBSD: connect.c,v 1.3 1997/10/11 08:13:40 lukem Exp $ */ /* * Hunt @@ -33,6 +33,7 @@ do_connect(name, team, enter_status) Ttyname = ttyname(STDOUT_FILENO); if (Ttyname == NULL) Ttyname = "not a tty"; + memset(buf, '\0', sizeof buf); (void) strlcpy(buf, Ttyname, sizeof buf); uid = htonl(getuid()); |