diff options
Diffstat (limited to 'games/fortune/strfile')
-rw-r--r-- | games/fortune/strfile/strfile.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/games/fortune/strfile/strfile.c b/games/fortune/strfile/strfile.c index 1dc5f4546c0..06ab3addc1b 100644 --- a/games/fortune/strfile/strfile.c +++ b/games/fortune/strfile/strfile.c @@ -1,4 +1,4 @@ -/* $OpenBSD: strfile.c,v 1.20 2014/10/11 04:00:56 doug Exp $ */ +/* $OpenBSD: strfile.c,v 1.21 2014/11/16 04:49:48 guenther Exp $ */ /* $NetBSD: strfile.c,v 1.4 1995/04/24 12:23:09 cgd Exp $ */ /*- @@ -33,9 +33,9 @@ * SUCH DAMAGE. */ -#include <sys/param.h> #include <ctype.h> #include <err.h> +#include <limits.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -89,7 +89,7 @@ typedef struct { } STR; char *Infile = NULL, /* input file name */ - Outfile[MAXPATHLEN] = "", /* output file name */ + Outfile[PATH_MAX] = "", /* output file name */ Delimch = '%'; /* delimiting character */ int Sflag = FALSE; /* silent run flag */ @@ -291,7 +291,7 @@ getargs(int argc, char *argv[]) } if (*Outfile == '\0') { (void) strlcpy(Outfile, Infile, sizeof(Outfile)); - if (strlcat(Outfile, ".dat", sizeof(Outfile)) >= MAXPATHLEN) + if (strlcat(Outfile, ".dat", sizeof(Outfile)) >= sizeof(Outfile)) errx(1, "`%s': name too long", Infile); } } |