NetBSD/usr.bin/sort
jdolecek 7fb961dd60 Only try to copy the extra incomplete record data if there is anything
actually read already. Albeit it's not damaging to copy zero data
for bufend == crec->data case, the buffer end could also be between
memory position 'crec' and 'crec->data'. Thus, we could end up with
negative 'bufend - crec->data' value, and obvious havoc.

This change fixes lib/12673, though the problem was masked and no longer
repeatable with the provided example after the recent buffer size bump.
The change was tested with the buffer size change backed off, and really
fixes the problem in the PR.
2001-05-15 11:49:25 +00:00
..
Makefile put tmp.c back to Makefile, too 2001-02-19 17:45:24 +00:00
append.c Pull up various cosmetic (mostly whitespace) changes from OpenBSD. 2001-02-19 20:50:17 +00:00
extern.h Pull up various cosmetic (mostly whitespace) changes from OpenBSD. 2001-02-19 20:50:17 +00:00
fields.c Pull up various cosmetic (mostly whitespace) changes from OpenBSD. 2001-02-19 20:50:17 +00:00
files.c Make compilable with -Wshadow 2001-05-15 11:18:23 +00:00
fsort.c Only try to copy the extra incomplete record data if there is anything 2001-05-15 11:49:25 +00:00
fsort.h Bump the initial record buffer size to 1MB and allow it to grow to 8MB, 2001-05-14 21:45:19 +00:00
init.c Pull up various cosmetic (mostly whitespace) changes from OpenBSD. 2001-02-19 20:50:17 +00:00
msort.c Pull up various cosmetic (mostly whitespace) changes from OpenBSD. 2001-02-19 20:50:17 +00:00
pathnames.h Two classes of changes from the initial OpenBSD commit of this sort(1): 2000-10-07 20:37:06 +00:00
sort.1 Add cross references for qsort(3), and radixsort(3), per PR 10567 2001-03-16 07:37:58 +00:00
sort.c disable the code which maxes nofiles limit, it should not be normally 2001-05-14 21:52:21 +00:00
sort.h cosmetic changes - make keylist[] static and remove extern definition 2001-02-19 19:31:29 +00:00
tmp.c Use MAXPATHLEN (which is 1024) instead of _POSIX_PATH_MAX (which is only 255). 2001-02-23 08:59:49 +00:00