Repository navigation
Conversation
url_savename_refname() passed 0 to MD5Init(), which byte-swaps on a little-endian host, so the hts-cache/ref names were not the MD5 of "adr,fil" there. Pass the native-endian flag, as domd5mem() does. Ref files left by an interrupted crawl from an older binary are no longer found on resume, and those files are fetched again. Test 754 pins three names against md5sum vectors. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Xavier Roche <roche@httrack.com>
hts_md5_init() picks the flag that gives the standard digest on this host, for domd5mem(), the changes report and the ref names. hts_md5_hex() replaces the two 16-argument sprintf calls. md5.h loses four prototypes that nothing defines. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Xavier Roche <roche@httrack.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Xavier Roche <roche@httrack.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Each
hts-cache/ref/*.reffile is named by an MD5 of its URL. On little-endian hosts that MD5 was wrong, becauseurl_savename_refname()passedMD5Init()the byte-swapping flag. A newhts_md5_init()now gives the right flag to all three MD5 users, andhts_md5_hex()replaces two longsprintfcalls.A crawl interrupted by an older binary on a little-endian host loses its
.reffiles once, so a resume downloads those partial files again.Test 754 checks three names against
md5sum. It fails on a build with the old flag, which gives51924b09...forabc,definstead ofd9355c9c....