HomeFreeBSD

sort: replace home made line reader by getdelim(3)

Description

sort: replace home made line reader by getdelim(3)

The previous code had bug when reading lines with an unexpected
encoding, returning without the full line being captured.
This result in sort complaining with "sort: Illegal byte sequence"

Using getdelim(3) instead of the home made code, fixes the situation.

PR: 241679
Reported by: Ronald F. Guilmette <rfg-freebsd@tristatelogic.com>
MFC After: 1 week
Reviewed by: markj, imp
Differential Revision: https://reviews.freebsd.org/D36948

(cherry picked from commit b58094c0d98e5d0ab8abdcdb655ac902ae8ad66e)

Details

Provenance
baptAuthored on Oct 12 2022, 1:31 PM
Reviewer
markj
Differential Revision
D36948: sort: replace home made line reader by getline(3)
Parents
rG24629492b8d1: OptionalObsoleteFiles: grep nls files have been removed 4 years ago
Branches
Unknown
Tags
Unknown