You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If it is not practical to handle arbitrary length comments it would be helpful to either have a more descriptive error or have a note about the limitation in the docs.
The text was updated successfully, but these errors were encountered:
Go version
go version go1.21.9 linux/amd64
Output of
go env
in your module/workspace:What did you do?
Trying to decompress a gzipped file that contains a large gzip header comment.
The gzip Reader structure uses a fixed 512 byte buffer to process the header, but comments can be arbitrary length.
src/compress/gzip/gunzip.go
For example openbsd packages (e.g. https://cdn.openbsd.org/pub/OpenBSD/7.5/packages/amd64/go-1.22.1.tgz ) stick a signature in the comment, which exceeds 512 bytes.
What did you see happen?
gzip.NewReader() fails with
gzip: invalid header
What did you expect to see?
If it is not practical to handle arbitrary length comments it would be helpful to either have a more descriptive error or have a note about the limitation in the docs.
The text was updated successfully, but these errors were encountered: