]> git.ipfire.org Git - thirdparty/coreutils.git/commit
cksum: fix length validation with SHA2- tagged format
authorPádraig Brady <P@draigBrady.com>
Mon, 6 Oct 2025 15:32:26 +0000 (16:32 +0100)
committerPádraig Brady <P@draigBrady.com>
Tue, 7 Oct 2025 14:58:36 +0000 (15:58 +0100)
commite661c7a52568710a3cedf8fbb3a683805f1caff2
treed6dacf82ca57ba84ccd539d9bd4445c99021a461
parentcd2a8edd84a6b6a17ba1b788a6b3930c5a4d590e
cksum: fix length validation with SHA2- tagged format

* src/digest.c (sha2_sum_stream): Change from unreachable()
to affirm() so that we have defined behavior unless
we configure with --disable-assert.
(sha3_sum_stream): Likewise.
(split_3): Validate SHA2-lengths before passing on.
* tests/cksum/cksum-c.sh: Add a test case.
* NEWS: Mention the bug fix.
NEWS
src/digest.c
tests/cksum/cksum-c.sh