mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-17 18:02:09 +03:00
* src/cut.c (delim_bytes): Add a spare byte so a maximum-length multi-byte delimiter stays NUL terminated for the strstr needle in find_field_delim. Note in 9.11 this buffer was larger (16 bytes) and so didn't not have a buffer over-read issue. (main): Ensure DELIM_BYTES is NUL terminated after each --delimeter. Also explicitly writing the NUL allows for better testing by triggering overflow issues in default builds, if the buffer is not sized correctly. * NEWS: Mention the bug fix. * tests/cut/cut.pl: Add test cases. Reported at https://github.com/coreutils/coreutils/pull/286