summaryrefslogtreecommitdiff
path: root/usr.sbin/sendmail/mailstats/mailstats.c
diff options
context:
space:
mode:
authorJason Downs <downsj@cvs.openbsd.org>1997-07-15 07:24:22 +0000
committerJason Downs <downsj@cvs.openbsd.org>1997-07-15 07:24:22 +0000
commit789b9a7da3a8e37d7c77250aeaec0d3825d5ffa4 (patch)
tree2f9cab67f55048e2bedf056aa1b3778127876deb /usr.sbin/sendmail/mailstats/mailstats.c
parent28d9c1750d3dfc4ddb8cb9056a18d073679ce6dd (diff)
Sendmail 8.8.6.
Diffstat (limited to 'usr.sbin/sendmail/mailstats/mailstats.c')
-rw-r--r--usr.sbin/sendmail/mailstats/mailstats.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/usr.sbin/sendmail/mailstats/mailstats.c b/usr.sbin/sendmail/mailstats/mailstats.c
index a003ea00b52..3a2394843e7 100644
--- a/usr.sbin/sendmail/mailstats/mailstats.c
+++ b/usr.sbin/sendmail/mailstats/mailstats.c
@@ -40,7 +40,7 @@ static char copyright[] =
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "@(#)mailstats.c 8.8 (Berkeley) 9/25/96";
+static char sccsid[] = "@(#)mailstats.c 8.10 (Berkeley) 5/30/97";
#endif /* not lint */
#define NOT_SENDMAIL
@@ -66,7 +66,7 @@ main(argc, argv)
bool mnames;
long frmsgs = 0, frbytes = 0, tomsgs = 0, tobytes = 0;
char mtable[MAXMAILERS][MNAMELEN+1];
- char sfilebuf[100];
+ char sfilebuf[MAXLINE];
char buf[MAXLINE];
extern char *ctime();
@@ -145,6 +145,13 @@ main(argc, argv)
}
/* this is the S or StatusFile option -- save it */
+ if (strlen(b) >= sizeof sfilebuf)
+ {
+ fprintf(stderr,
+ "StatusFile filename too long: %.30s...\n",
+ s);
+ exit(EX_CONFIG);
+ }
strcpy(sfilebuf, b);
b = strchr(sfilebuf, '#');
if (b == NULL)