diff options
author | dm <dm@cvs.openbsd.org> | 1997-06-02 17:00:52 +0000 |
---|---|---|
committer | dm <dm@cvs.openbsd.org> | 1997-06-02 17:00:52 +0000 |
commit | 04eff0e424ffbc371025b9e8920e790a7ac81b9a (patch) | |
tree | dad4785de2f499bda108080d16df23a7a3ab9ebc /usr.bin/mail | |
parent | 4dd0aa36bc4b158ad7daf23fd77ded67eeefd6d7 (diff) |
buflen != sizeof (char *)
Diffstat (limited to 'usr.bin/mail')
-rw-r--r-- | usr.bin/mail/v7.local.c | 8 |
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'; } } |