diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1997-01-22 05:49:20 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1997-01-22 05:49:20 +0000 |
commit | aa47e726ca694936eb0f7133827762410798817e (patch) | |
tree | 419f115ec887266635581905ad0147a4a128382f /usr.bin | |
parent | a9e09109262e2e5ce2515217ce11d110eb901ad1 (diff) |
Off by one error. Fixes a core dump.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/sort/fsort.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/sort/fsort.c b/usr.bin/sort/fsort.c index 8365edde872..122608ae646 100644 --- a/usr.bin/sort/fsort.c +++ b/usr.bin/sort/fsort.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fsort.c,v 1.1 1997/01/20 19:39:51 millert Exp $ */ +/* $OpenBSD: fsort.c,v 1.2 1997/01/22 05:49:19 millert Exp $ */ /*- * Copyright (c) 1993 @@ -40,7 +40,7 @@ #if 0 static char sccsid[] = "@(#)fsort.c 8.1 (Berkeley) 6/6/93"; #else -static char rcsid[] = "$OpenBSD: fsort.c,v 1.1 1997/01/20 19:39:51 millert Exp $"; +static char rcsid[] = "$OpenBSD: fsort.c,v 1.2 1997/01/22 05:49:19 millert Exp $"; #endif #endif /* not lint */ @@ -97,7 +97,7 @@ fsort(binno, depth, infiles, nfiles, outfp, ftbl) if (!SINGL_FLD) linebuf = malloc(MAXLLEN); } - bufend = buffer + BUFSIZE; + bufend = buffer + BUFSIZE - 1; if (binno >= 0) { tfiles.top = infiles.top + nfiles; get = getnext; |