diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2001-08-30 17:25:36 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2001-08-30 17:25:36 +0000 |
commit | dd5f144f85e5df88ab4a14a99cc83dc9a0b67b2e (patch) | |
tree | 5328ad3a7f66bdb2a13eaa92469d3a4b09440400 | |
parent | f5b8217554eb6fd9b0ff7b0c91896bcd73e7a441 (diff) |
Better buffer lengths (MAXFOO and FOO_MAX) based on a patch from
ianm@cit.uws.edu.au.
-rw-r--r-- | usr.sbin/lpr/common_source/rmjob.c | 6 | ||||
-rw-r--r-- | usr.sbin/lpr/lpd/printjob.c | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/usr.sbin/lpr/common_source/rmjob.c b/usr.sbin/lpr/common_source/rmjob.c index d5cc985782a..4a121b23fc1 100644 --- a/usr.sbin/lpr/common_source/rmjob.c +++ b/usr.sbin/lpr/common_source/rmjob.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rmjob.c,v 1.9 1998/04/22 14:44:08 deraadt Exp $ */ +/* $OpenBSD: rmjob.c,v 1.10 2001/08/30 17:25:35 millert Exp $ */ /* * Copyright (c) 1983, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)rmjob.c 8.2 (Berkeley) 4/28/95"; #else -static char rcsid[] = "$OpenBSD: rmjob.c,v 1.9 1998/04/22 14:44:08 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: rmjob.c,v 1.10 2001/08/30 17:25:35 millert Exp $"; #endif #endif /* not lint */ @@ -71,7 +71,7 @@ extern char *person; /* name of person doing lprm */ static char root[] = "root"; static int all = 0; /* eliminate all files (root only) */ static int cur_daemon; /* daemon's pid */ -static char current[40]; /* active control file name */ +static char current[NAME_MAX]; /* active control file name */ extern uid_t uid, euid; /* real and effective user id's */ diff --git a/usr.sbin/lpr/lpd/printjob.c b/usr.sbin/lpr/lpd/printjob.c index 046e08d5b43..a6bc7475f09 100644 --- a/usr.sbin/lpr/lpd/printjob.c +++ b/usr.sbin/lpr/lpd/printjob.c @@ -1,4 +1,4 @@ -/* $OpenBSD: printjob.c,v 1.23 2001/07/09 07:05:02 deraadt Exp $ */ +/* $OpenBSD: printjob.c,v 1.24 2001/08/30 17:25:35 millert Exp $ */ /* $NetBSD: printjob.c,v 1.9.4.3 1996/07/12 22:31:39 jtc Exp $ */ /* @@ -103,12 +103,12 @@ static char title[80]; /* ``pr'' title */ static int tof; /* true if at top of form */ static char class[32]; /* classification field */ -static char fromhost[32]; /* user's host machine */ +static char fromhost[MAXHOSTNAMELEN]; /* user's host machine */ /* indentation size in static characters */ static char indent[10] = "-i0"; -static char jobname[100]; /* job or file name */ +static char jobname[NAME_MAX]; /* job or file name */ static char length[10] = "-l"; /* page length in lines */ -static char logname[MAXLOGNAME]; /* user's login name */ +static char logname[MAXLOGNAME]; /* user's login name */ static char pxlength[10] = "-y"; /* page length in pixels */ static char pxwidth[10] = "-x"; /* page width in pixels */ static char tempfile[] = "errsXXXXXXXXXX"; /* file name for filter output */ |