Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix minor bug in digest length check #175

Merged
merged 2 commits into from
Jan 12, 2025
Merged

Conversation

pauldreik
Copy link
Owner

thanks to @trollkarlen (see #167) for finding this.

the consequences are mostly annoying: if run with SHA512 as checksum type, a printout is shown: wrong answer from getDigestLength! FIXME

this tells me almost noone uses the SHA512 option, at least not to the extent of getting annoyed and filing an issue.

I made the check into an assert and extended the unit test to trigger the interesting part of the code.

Paul Dreik added 2 commits January 12, 2025 16:59
…nto an assert

credit to github user @trollkarlen for finding this.

changed it to an assert since it should be caught in CI if it ever
happens.

while doing that, I detected that the unit test was not sufficient to
cover the assert.

the only consequence was that with SHA512 as checksum, an alarming output
was printed. there was no missed/false duplicate detection.
@pauldreik pauldreik merged commit 1acbf12 into devel Jan 12, 2025
22 checks passed
@pauldreik pauldreik deleted the minor_bug_in_digest_length branch January 12, 2025 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant