Skip to content

Properly use zend_long when parsing parameters - #11

Open
DanielEScherzer wants to merge 1 commit into
mainfrom
long-type
Open

DanielEScherzer wants to merge 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.
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