From 32b65a86d0b2b966afb97a6694f92ff4f8d4d83f Mon Sep 17 00:00:00 2001 From: ae Date: Mon, 6 Jun 2011 10:52:26 +0000 Subject: Increase buffer size for the command line. PR: bin/125370 Submitted by: sem MFC after: 2 weeks --- sbin/ipfw/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sbin/ipfw') diff --git a/sbin/ipfw/main.c b/sbin/ipfw/main.c index fb3f3fb..be6c093f 100644 --- a/sbin/ipfw/main.c +++ b/sbin/ipfw/main.c @@ -444,7 +444,7 @@ static void ipfw_readfile(int ac, char *av[]) { #define MAX_ARGS 32 - char buf[BUFSIZ]; + char buf[4096]; char *progname = av[0]; /* original program name */ const char *cmd = NULL; /* preprocessor name, if any */ const char *filename = av[ac-1]; /* file to read */ @@ -552,7 +552,7 @@ ipfw_readfile(int ac, char *av[]) } } - while (fgets(buf, BUFSIZ, f)) { /* read commands */ + while (fgets(buf, sizeof(buf), f)) { /* read commands */ char linename[20]; char *args[2]; -- cgit v1.1