FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

bpo-45507: Throw EOF error when gzip headers or trailers are truncated by rhpvorderman · Pull Request #29023 · python/cpython · GitHub

/ cpython Public

bpo-45507: Throw EOF error when gzip headers or trailers are truncated - #29023

Closed
rhpvorderman wants to merge 2 commits into
python:mainfrom
rhpvorderman:patch-1
Closed

bpo-45507: Throw EOF error when gzip headers or trailers are truncated#29023
rhpvorderman wants to merge 2 commits into
python:mainfrom
rhpvorderman:patch-1

Conversation

rhpvorderman commented Oct 18, 2021
edited
Loading

Copy link
Copy Markdown
Contributor

This is to keep error compatibility with 3.10 and lower.

It was missed in my last PR #27941. When the gzip member contains an incomplete trailer (less than 8 bytes) the GzipFile-based implementation of 3.10 and below would throuw an EOF error, so the newer in-memory implementation should do the same.
Currently it throws 'struct.error: unpack requires a buffer of 8 bytes' when the trailer is truncated.

https://bugs.python.org/issue45507

rhpvorderman commented Oct 18, 2021
edited
Loading

Copy link
Copy Markdown
Contributor Author

This can have a 'skip news' label, but I can't add it myself. Added regression tests now and added a news item accordingly.

This is to keep error compatibility with 3.10 and lower.
rhpvorderman changed the title bpo-45507: Throw EOF error when trailer is not present in gzip member bpo-45507: Throw EOF error when gzip headers or trailers are truncated Oct 18, 2021

Copy link
Copy Markdown
Contributor Author

Closing this PR as it confounds two issues: Header and trailer

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL