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
append.c Pull up various cosmetic (mostly whitespace) changes from OpenBSD. 2001-02-19 20:50:17 +00:00
extern.h
fields.c
files.c
fsort.c
fsort.h
init.c Pull up various cosmetic (mostly whitespace) changes from OpenBSD. 2001-02-19 20:50:17 +00:00
msort.c
pathnames.h
sort.1
sort.c
sort.h
tmp.c