Skip to content

fix(zfile): check gzread returns for truncated or corrupt input - #5372

Open
lgritz wants to merge 1 commit into
AcademySoftwareFoundation:mainfrom
lgritz:lg-zfile
Open

fix(zfile): check gzread returns for truncated or corrupt input#5372
lgritz wants to merge 1 commit into
AcademySoftwareFoundation:mainfrom
lgritz:lg-zfile

Conversation

@lgritz

@lgritz lgritz commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

The reader ignored gzread()'s return value when reading the header and each scanline, so a truncated or corrupt (gzip) file was processed with whatever happened to be in the buffer. Verify the requested number of bytes was actually read and error out otherwise.

Also add a test for the decompression bomb checks that have already been added in a prior PR.

Assisted-by: GitHub Copilot / Claude Opus 4.8

The reader ignored gzread()'s return value when reading the header and
each scanline, so a truncated or corrupt (gzip) file was processed with
whatever happened to be in the buffer. Verify the requested number of
bytes was actually read and error out otherwise.

Also add a test for the decomression bomb checks that have already
been added in a prior PR.

Assisted-by: GitHub Copilot / Claude Opus 4.8

Signed-off-by: Larry Gritz <lg@larrygritz.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant