summaryrefslogtreecommitdiff
path: root/usr.bin/mail/v7.local.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/mail/v7.local.c')
-rw-r--r--usr.bin/mail/v7.local.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/mail/v7.local.c b/usr.bin/mail/v7.local.c
index 056e6723cb6..2b743778e20 100644
--- a/usr.bin/mail/v7.local.c
+++ b/usr.bin/mail/v7.local.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: v7.local.c,v 1.4 1997/05/30 08:51:45 deraadt Exp $ */
+/* $OpenBSD: v7.local.c,v 1.5 1997/06/02 17:00:51 dm Exp $ */
/* $NetBSD: v7.local.c,v 1.7 1996/06/08 19:48:44 christos Exp $ */
/*
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)v7.local.c 8.1 (Berkeley) 6/6/93";
#else
-static char rcsid[] = "$OpenBSD: v7.local.c,v 1.4 1997/05/30 08:51:45 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: v7.local.c,v 1.5 1997/06/02 17:00:51 dm Exp $";
#endif
#endif /* not lint */
@@ -69,8 +69,8 @@ findmail(user, buf, buflen)
if (!(mbox = getenv("MAIL")))
(void)snprintf(buf, sizeof buf, "%s/%s", _PATH_MAILDIR, user);
else {
- (void)strncpy(buf, mbox, sizeof buf - 1);
- buf[sizeof buf - 1] = '\0';
+ (void)strncpy(buf, mbox, buflen - 1);
+ buf[buflen - 1] = '\0';
}
}