archive/zip: CRC32 data descriptor and central directory entry need no longer match in go1.17 #49089
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Before 1.17, if a zip file's central directory entry's CRC32 value was different to it's data descriptor entry,
ErrChecksum
would be returned.I've written a test with such behaviour. This fails with 1.17, but succeeds for 1.16.
https://play.golang.org/p/103JOqe-uKp
What did you expect to see?
I don't think it was intentional for this to be changed, therefore, both CRC32 entries should still be checked against each other.
What did you see instead?
If a data descriptor is present, only it's CRC32 field is taken into consideration.
The text was updated successfully, but these errors were encountered: