Skip to content

Fix ini quantity parsing bugs #17274

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed

Conversation

nielsdos
Copy link
Member

No change to ZEND_STRTOL or anything like that, as that's kind of tangential and this is a stable branch anyway.

Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

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

MSTM, but maybe @arnaud-lb also wants to check this?

Copy link
Member

@arnaud-lb arnaud-lb left a comment

Choose a reason for hiding this comment

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

This looks good to me.

In hindsight, a comment before the call to zend_ini_consume_quantity_prefix() would be useful to show why we check if the string has an other prefix. Something along the lines of "STRTOULL may silently ignore a prefix of whitespace, sign, and base prefix, which would be invalid at this position".

@nielsdos
Copy link
Member Author

nielsdos commented Jan 9, 2025

I'll add a comment in the merge.

@nielsdos nielsdos closed this in a2b8204 Jan 9, 2025
charmitro pushed a commit to wasix-org/php that referenced this pull request Mar 13, 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.

ini_parse_quantity() fails to parse inputs starting with 0x0b ini_parse_quantity() fails to emit warning for 0x+0
3 participants