enlarge buffer sizes trunk
authorchristos <christos@NetBSD.org>
Sat, 12 Oct 2019 17:26:26 +0000
branchtrunk
changeset 455272 28ceeeac1d62
parent 455271 9ed269afacdb
child 455273 9056833a3270
enlarge buffer sizes
usr.sbin/catman/catman.c
--- a/usr.sbin/catman/catman.c	Sat Oct 12 15:44:46 2019 +0000
+++ b/usr.sbin/catman/catman.c	Sat Oct 12 17:26:26 2019 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: catman.c,v 1.37 2016/05/29 22:33:39 dholland Exp $       */
+/*      $NetBSD: catman.c,v 1.38 2019/10/12 17:26:26 christos Exp $       */
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: catman.c,v 1.37 2016/05/29 22:33:39 dholland Exp $");
+__RCSID("$NetBSD: catman.c,v 1.38 2019/10/12 17:26:26 christos Exp $");
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -340,14 +340,14 @@
 {
 	TAG *buildp, *crunchp;
 	ENTRY *e_build, *e_crunch;
-	char manpage[PATH_MAX];
-	char catpage[PATH_MAX];
+	char manpage[2 * PATH_MAX];
+	char catpage[2 * PATH_MAX];
 	char linkname[PATH_MAX];
 	char buffer[PATH_MAX], *bp;
-	char tmp[PATH_MAX];
+	char tmp[2 * PATH_MAX];
 	char buildsuff[256], buildcmd[256];
 	char crunchsuff[256], crunchcmd[256];
-	char match[256];
+	char match[2 * 256];
 	struct stat manstat;
 	struct stat catstat;
 	struct stat lnkstat;
@@ -570,7 +570,7 @@
     const char *crunchcmd)
 {
 	char crunchbuf[1024];
-	char sysbuf[2048];
+	char sysbuf[2048 + 128];
 	size_t len;
 
 	len = snprintf(sysbuf, sizeof(sysbuf), buildcmd, manpage);