Skip to content

zend_ini.c: fix zend_ini_bool_literal() with unknown INI setting#22209

Open
Girgias wants to merge 1 commit into
php:masterfrom
Girgias:fix-zend-ini-macros
Open

zend_ini.c: fix zend_ini_bool_literal() with unknown INI setting#22209
Girgias wants to merge 1 commit into
php:masterfrom
Girgias:fix-zend-ini-macros

Conversation

@Girgias
Copy link
Copy Markdown
Member

@Girgias Girgias commented Jun 2, 2026

Closes GH-22208

Copy link
Copy Markdown
Member

@TimWolla TimWolla left a comment

Choose a reason for hiding this comment

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

I'm not sure I like this, because zend_ini_parse_bool is also used in other contexts than zend_ini_str() where crashing for NULL inputs might be the right thing to do.

It might be cleaner to have a dedicated bool zend_ini_bool(const char *name, size_t name_length, bool orig) that is wrapped by zend_ini_bool_literal() and then contains the delegate to zend_ini_str + NULL check zend_ini_parse_bool.

But I don't have a strong opinion on this. The change definitely works.

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.

NULL-dereference in zend_ini_bool_literal() for non-existent INIs (PHP 8.6)

2 participants