Page MenuHomeFreeBSD

md5: fix *sum -c with missing files
ClosedPublic

Authored by kevans on Nov 12 2022, 1:10 AM.
Tags
None
Referenced Files
F150211994: D37374.diff
Mon, Mar 30, 7:30 AM
Unknown Object (File)
Tue, Mar 17, 6:01 PM
Unknown Object (File)
Thu, Mar 12, 3:15 PM
Unknown Object (File)
Thu, Mar 12, 3:10 PM
Unknown Object (File)
Feb 22 2026, 6:51 AM
Unknown Object (File)
Feb 8 2026, 11:17 AM
Unknown Object (File)
Jan 23 2026, 8:55 PM
Unknown Object (File)
Jan 19 2026, 10:15 AM
Subscribers

Details

Summary

If we fail to open one of the files in the file listing, we still need
to advance rec along with argv so that the checksum we're checking
against lines up with the file we're hashing.

Tests added both for the -c flag, as well as the -b and -t modes of
the *sum programs.

PR: 267722

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

emaste added inline comments.
sbin/md5/tests/md5_test.sh
48–50

can just invoke sha256 a b c instead? or, perhaps even just create expected and sums with explicit content?

This revision is now accepted and ready to land.Nov 12 2022, 2:03 AM
This revision was automatically updated to reflect the committed changes.