Pádraig Brady <[email protected]> writes: > It's not a usual case, but for consistency "-a sha2" should support > e.g. untagged checksums that are a mix of sha256sum and sha512sum. > > * src/cksum.c (split_3): Reset the sha2 variant search if > the generic sha2 is specified. It's ok to reset the global > CKSUM_ALGORITHM as its subsequent use is conflicting with > the specific chosen variant. > * tests/cksum/cksum-c.sh: Add test cases. > * NEWS: Mention the bug fix. > > Discovered by Anthropic's OSS Scanner, as bug ANT-2026-83HIODH2. > Discovered by SecBuddyF (with Hy4-preview) of Tencent KeenSecurityLab. > --- > NEWS | 6 ++++++ > src/cksum.c | 4 ++++ > tests/cksum/cksum-c.sh | 14 ++++++++++++++ > 3 files changed, 24 insertions(+)
Nice work. Much better than the ugly solution I mentioned privately. Thanks for that and the other fixes. Collin
