Files
coreutils/tests/split
Ismail Ramzi a65907555f split: fix out-of-bounds read with --hex-suffixes=FROM
When FROM contained the digits a-f, next_file_name() derived the
suffix index with c - '0', giving values up to 54 for a 16 character
alphabet.  Incrementing the suffix then read past the end of the
alphabet string and used those bytes in the output file names,
e.g., 'split --hex-suffixes=f' created x0f, x0s, x0u.

* src/split.c (next_file_name): Map start value characters through
the suffix alphabet rather than assuming decimal digits.
(main): Reject a start value not valid for the final suffix alphabet,
as can happen with --hex-suffixes=a --numeric-suffixes.
(set_suffix_length): Determine width using base 16 for hex suffixes.
* tests/split/numeric.sh: Add test cases.
* NEWS: Mention the bug fix.

Link: https://github.com/coreutils/coreutils/pull/404
Also discovered by Anthropic's OSS Scanner, as bug ANT-2026-DWADVADP.
2026-11-03 13:28:02 +00:00
..
2026-01-01 10:56:16 -08:00
2026-01-01 10:56:16 -08:00
2026-01-01 10:56:16 -08:00
2026-01-01 10:56:16 -08:00