summaryrefslogtreecommitdiffstats
path: root/battlestar
diff options
context:
space:
mode:
authorjsm <jsm@NetBSD.org>1999-09-18 16:47:11 +0000
committerjsm <jsm@NetBSD.org>1999-09-18 16:47:11 +0000
commitfa213838b361bf110cedaa5fd78622fe38c911e2 (patch)
tree5d165dce169094d886950967950fbf60535867f7 /battlestar
parent440f6770ed48493d591bd1ba3a93cde8081d704d (diff)
downloadbsdgames-darwin-fa213838b361bf110cedaa5fd78622fe38c911e2.tar.gz
bsdgames-darwin-fa213838b361bf110cedaa5fd78622fe38c911e2.tar.zst
bsdgames-darwin-fa213838b361bf110cedaa5fd78622fe38c911e2.zip
Use strncpy() rather than strcpy() with fixed size buffer.
Diffstat (limited to 'battlestar')
-rw-r--r--battlestar/init.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/battlestar/init.c b/battlestar/init.c
index 003e0cc8..854021a8 100644
--- a/battlestar/init.c
+++ b/battlestar/init.c
@@ -1,4 +1,4 @@
-/* $NetBSD: init.c,v 1.10 1999/09/13 17:18:57 jsm Exp $ */
+/* $NetBSD: init.c,v 1.11 1999/09/18 16:47:11 jsm Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)init.c 8.4 (Berkeley) 4/30/95";
#else
-__RCSID("$NetBSD: init.c,v 1.10 1999/09/13 17:18:57 jsm Exp $");
+__RCSID("$NetBSD: init.c,v 1.11 1999/09/18 16:47:11 jsm Exp $");
#endif
#endif /* not lint */
@@ -84,7 +84,7 @@ getutmp(uname)
struct passwd *ptr;
ptr = getpwuid(getuid());
- strcpy(uname, ptr ? ptr->pw_name : "");
+ strncpy(uname, ptr ? ptr->pw_name : "", 8);
}
const char *const list[] = { /* hereditary wizards */