diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-01-16 06:40:24 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-01-16 06:40:24 +0000 |
commit | 315054f4737a39489e0a14f3a92bff61f1592832 (patch) | |
tree | 62bf010653374ce09b6beb4dfa0414a91457233b /usr.bin/uudecode/uudecode.c | |
parent | 79e3d817585ca08a91e30ad14abe43e2ab70295f (diff) |
Replace <sys/param.h> with <limits.h> and other less dirty headers where
possible. Annotate <sys/param.h> lines with their current reasons. Switch
to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change
MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where
sensible to avoid pulling in the pollution. These are the files confirmed
through binary verification.
ok guenther, millert, doug (helped with the verification protocol)
Diffstat (limited to 'usr.bin/uudecode/uudecode.c')
-rw-r--r-- | usr.bin/uudecode/uudecode.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.bin/uudecode/uudecode.c b/usr.bin/uudecode/uudecode.c index 2b03e6ef615..65801e1093b 100644 --- a/usr.bin/uudecode/uudecode.c +++ b/usr.bin/uudecode/uudecode.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uudecode.c,v 1.19 2014/05/20 01:25:23 guenther Exp $ */ +/* $OpenBSD: uudecode.c,v 1.20 2015/01/16 06:40:13 deraadt Exp $ */ /* $FreeBSD: uudecode.c,v 1.49 2003/05/03 19:44:46 obrien Exp $ */ /*- @@ -35,7 +35,6 @@ * Used with uuencode. */ -#include <sys/param.h> #include <sys/socket.h> #include <sys/stat.h> @@ -51,6 +50,7 @@ #include <stdlib.h> #include <string.h> #include <unistd.h> +#include <limits.h> static const char *infile, *outfile; static FILE *infp, *outfp; @@ -182,7 +182,7 @@ decode2(void) void *handle; struct passwd *pw; struct stat st; - char buf[MAXPATHLEN]; + char buf[PATH_MAX]; base64 = 0; /* search for header line */ @@ -334,7 +334,7 @@ uu_decode(void) { int i, ch; char *p; - char buf[MAXPATHLEN]; + char buf[PATH_MAX]; /* for each input line */ for (;;) { @@ -412,8 +412,8 @@ static int base64_decode(void) { int n; - char inbuf[MAXPATHLEN]; - unsigned char outbuf[MAXPATHLEN * 4]; + char inbuf[PATH_MAX]; + unsigned char outbuf[PATH_MAX * 4]; for (;;) { switch (get_line(inbuf, sizeof(inbuf))) { |