Skip to content

archive/zip: CRC32 data descriptor and central directory entry need no longer match in go1.17 #49089

Description

@saracen

What version of Go are you using (go version)?

$ go version
go version go1.17 darwin/amd64

Does this issue reproduce with the latest release?

Yes.

What operating system and processor architecture are you using (go env)?

go env Output
$ go env

What 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions