]> git.ipfire.org Git - thirdparty/coreutils.git/commit
cksum: fix reporting of failed checks
authorPádraig Brady <P@draigBrady.com>
Thu, 23 Mar 2023 12:31:24 +0000 (12:31 +0000)
committerPádraig Brady <P@draigBrady.com>
Thu, 23 Mar 2023 12:36:53 +0000 (12:36 +0000)
commit76f2fb627118a26c25003dbd98c22c153b7ee1d2
treeed7ed77e149e1acc28e4399fc88c2f38955a3000
parenteeabb11eb6697a137894db066715a07550c6d82a
cksum: fix reporting of failed checks

This applies to all checksumming utilities,
where we incorrectly report all subsequent files as checking 'OK'
once any file has passed a digest check.
The exit status was not impacted, only the printed status.

* src/digest.c (digest_check): Use the correct state variable
to determine if the _current_ file has passed or not.
* tests/misc/md5sum.pl: Add a test case.
Fixes https://bugs.gnu.org/62403
src/digest.c
tests/misc/md5sum.pl