Skip to content

Properly use zend_long when parsing parameters - #11

Merged
DanielEScherzer merged 1 commit into
mainfrom
long-type
Nov 1, 2026
Merged

DanielEScherzer merged 1 commit into
mainfrom
long-type

Conversation

@DanielEScherzer

Copy link
Copy Markdown
Owner

Otherwise Rust might infer i32 (4 bytes) while PHP is using zend_long (8 bytes), leading to PHP overwriting other memory, e.g. the next variable. This fixes the issue with the ZPP test in the demo extension having the wrong result for nullable integer parameters - the memory overwritten was the variable for marking if the integer was null or not.

Otherwise Rust might infer `i32` (4 bytes) while PHP is using `zend_long` (8
bytes), leading to PHP overwriting other memory, e.g. the next variable. This
fixes the issue with the ZPP test in the demo extension having the wrong result
for nullable integer parameters - the memory overwritten was the variable for
marking if the integer was null or not.
@DanielEScherzer
DanielEScherzer merged commit b7ab1a3 into main Nov 1, 2026
17 checks passed
@DanielEScherzer
DanielEScherzer deleted the long-type branch November 1, 2026 22:53
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