freebsd-dev/usr.bin/sort
Alex Richardson d053fb22f6 usr.bin/sort: Avoid UBSan errors
UBSan complains about out-of-bounds accesses for zero-length arrays. To
avoid this we can use flexible array members. However, the C standard does
not allow for structures that only contain flexible array members, so we
move the length parameters into that structure too.

Split out from D28233.

Reviewed By:	markj
MFC after:	1 week
Differential Revision: https://reviews.freebsd.org/D31009
2021-07-06 10:51:05 +01:00
..
nls
tests
bwstring.c usr.bin/sort: Avoid UBSan errors 2021-07-06 10:51:05 +01:00
bwstring.h usr.bin/sort: Avoid UBSan errors 2021-07-06 10:51:05 +01:00
coll.c
coll.h
file.c
file.h sort: Change default algorithm to mergesort 2021-06-17 13:53:03 -04:00
Makefile usr.bin/sort: Avoid UBSan errors 2021-07-06 10:51:05 +01:00
Makefile.depend
Makefile.depend.options
mem.c
mem.h
radixsort.c sort: Cache value of MB_CUR_MAX 2021-05-13 09:33:19 -04:00
radixsort.h
sort.1.in
sort.c sort: Cache value of MB_CUR_MAX 2021-05-13 09:33:19 -04:00
sort.h sort: Cache value of MB_CUR_MAX 2021-05-13 09:33:19 -04:00
vsort.c
vsort.h