summaryrefslogtreecommitdiff
path: root/usr.bin/msgs/msgs.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2003-04-07 21:13:55 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2003-04-07 21:13:55 +0000
commit05325cbf2cd782c5388d92a0023e6ec0b1292641 (patch)
tree6f33c59185acb04605fe514c61eb613674481da1 /usr.bin/msgs/msgs.c
parentb236858cae71da07b39c9bf332ce1b65fde49767 (diff)
replace strcpy calls that got inlined by gcc; Hans-Joerg.Hoexer@yerbouti.franken.de
Diffstat (limited to 'usr.bin/msgs/msgs.c')
-rw-r--r--usr.bin/msgs/msgs.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/msgs/msgs.c b/usr.bin/msgs/msgs.c
index 15f6ce22eb5..0decb021d69 100644
--- a/usr.bin/msgs/msgs.c
+++ b/usr.bin/msgs/msgs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: msgs.c,v 1.24 2003/03/13 09:09:33 deraadt Exp $ */
+/* $OpenBSD: msgs.c,v 1.25 2003/04/07 21:13:54 deraadt Exp $ */
/* $NetBSD: msgs.c,v 1.7 1995/09/28 06:57:40 tls Exp $ */
/*-
@@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)msgs.c 8.2 (Berkeley) 4/28/95";
#else
-static char rcsid[] = "$OpenBSD: msgs.c,v 1.24 2003/03/13 09:09:33 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: msgs.c,v 1.25 2003/04/07 21:13:54 deraadt Exp $";
#endif
#endif /* not lint */
@@ -802,11 +802,11 @@ ask(prompt)
fname[n] = NULL;
}
else
- strcpy(fname, "Messages");
+ strlcpy(fname, "Messages", sizeof fname);
fd = open(fname, O_RDWR|O_EXCL|O_CREAT|O_APPEND, 0666);
}
else {
- strcpy(fname, _PATH_TMPFILE);
+ strlcpy(fname, _PATH_TMPFILE, sizeof fname);
fd = mkstemp(fname);
if (fd != -1) {
snprintf(cmdbuf, sizeof(cmdbuf), _PATH_MAIL, fname);