Skip to content

Zlib: Fix the bug when zval_get_long silently cast several options into long in deflate_init#21860

Open
LamentXU123 wants to merge 2 commits intophp:masterfrom
LamentXU123:refact
Open

Zlib: Fix the bug when zval_get_long silently cast several options into long in deflate_init#21860
LamentXU123 wants to merge 2 commits intophp:masterfrom
LamentXU123:refact

Conversation

@LamentXU123
Copy link
Copy Markdown
Contributor

@LamentXU123 LamentXU123 commented Apr 24, 2026

I opened #21841 yesterday to fix the case in one option strategy and after a closer look this morning I realized almost every options in this function has the same problem. So this follow-up PR fix them all. (I will take a look of similar occasions in the future :) ).

plus: to make things easy I write a helper function to throw errors

Comment thread ext/zlib/tests/deflate_init_strategy_type_error.phpt Outdated
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