Skip to content

Fix OOB gzseek() causing assertion failure#20785

Closed
ndossche wants to merge 3 commits intophp:PHP-8.3from
ndossche:gzseek-oob
Closed

Fix OOB gzseek() causing assertion failure#20785
ndossche wants to merge 3 commits intophp:PHP-8.3from
ndossche:gzseek-oob

Conversation

@ndossche
Copy link
Copy Markdown
Member

No description provided.

Comment thread ext/zlib/zlib_fopen_wrapper.c Outdated
*newoffs = gzseek(self->gz_file, offset, whence);

return (*newoffs < 0) ? -1 : 0;
off_t new_offset = gzseek(self->gz_file, offset, whence);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(tiny) nit: new_offset should be a z_off_t.

Copy link
Copy Markdown
Member

@devnexen devnexen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense. I m surprised no one reported it tough, seems pretty straightforward.

@ndossche ndossche closed this in 2709ebc Dec 27, 2025
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.

2 participants