summaryrefslogtreecommitdiffstats
path: root/usr.bin/fmt/fmt.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/fmt/fmt.c')
-rw-r--r--usr.bin/fmt/fmt.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.bin/fmt/fmt.c b/usr.bin/fmt/fmt.c
index 3c85550..fc27f65 100644
--- a/usr.bin/fmt/fmt.c
+++ b/usr.bin/fmt/fmt.c
@@ -42,7 +42,7 @@ static char copyright[] =
static char sccsid[] = "@(#)fmt.c 8.1 (Berkeley) 7/20/93";
#else
static const char rcsid[] =
- "$Id$";
+ "$Id: fmt.c,v 1.9 1997/07/03 07:19:46 charnier Exp $";
#endif
#endif /* not lint */
@@ -162,7 +162,11 @@ fmt(fi)
register char *cp, *cp2, cc;
register int c, col;
#define CHUNKSIZE 1024
- static int lbufsize = 0, cbufsize = 0;
+ static int lbufsize = 0, cbufsize = CHUNKSIZE;
+
+ canonb = malloc(CHUNKSIZE);
+ if (canonb == 0)
+ abort();
if (center) {
linebuf = malloc(BUFSIZ);
OpenPOWER on IntegriCloud