mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-17 18:02:09 +03:00
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.