summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>1997-06-16 20:57:06 +0000
committermillert <millert@openbsd.org>1997-06-16 20:57:06 +0000
commit44cb25465402c00da13694037bc8b31b2495509d (patch)
treea0bf6670ad888fb9ed0976e1d1bfef5835c34b9d
parentYou can't store a double in an int and then do tests for the fractional part (diff)
downloadwireguard-openbsd-44cb25465402c00da13694037bc8b31b2495509d.tar.xz
wireguard-openbsd-44cb25465402c00da13694037bc8b31b2495509d.zip
Use buflen, not sizeof(buf) as buf is a pointer.
-rw-r--r--usr.bin/mail/v7.local.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/mail/v7.local.c b/usr.bin/mail/v7.local.c
index 2b743778e20..344c6e29fe1 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.5 1997/06/02 17:00:51 dm Exp $ */
+/* $OpenBSD: v7.local.c,v 1.6 1997/06/16 20:57:06 millert 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.5 1997/06/02 17:00:51 dm Exp $";
+static char rcsid[] = "$OpenBSD: v7.local.c,v 1.6 1997/06/16 20:57:06 millert Exp $";
#endif
#endif /* not lint */
@@ -67,7 +67,7 @@ findmail(user, buf, buflen)
char *mbox;
if (!(mbox = getenv("MAIL")))
- (void)snprintf(buf, sizeof buf, "%s/%s", _PATH_MAILDIR, user);
+ (void)snprintf(buf, buflen, "%s/%s", _PATH_MAILDIR, user);
else {
(void)strncpy(buf, mbox, buflen - 1);
buf[buflen - 1] = '\0';