diff options
author | 1997-01-22 05:49:19 +0000 | |
---|---|---|
committer | 1997-01-22 05:49:19 +0000 | |
commit | ba0a17509ff7219082828fc68a4fe31312409faa (patch) | |
tree | bcc8062150ea29f8221590698b5fb7dc571b9719 | |
parent | Don't fault a page in twice (first prefault, then vm_fault); the first was (diff) | |
download | wireguard-openbsd-ba0a17509ff7219082828fc68a4fe31312409faa.tar.xz wireguard-openbsd-ba0a17509ff7219082828fc68a4fe31312409faa.zip |
Off by one error. Fixes a core dump.
-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; |