ext/exif: Replace zend_parse_parameters() with ZEND_PARSE_PARAMETERS macros#21126
ext/exif: Replace zend_parse_parameters() with ZEND_PARSE_PARAMETERS macros#21126arshidkv12 wants to merge 3 commits intophp:masterfrom
Conversation
TimWolla
left a comment
There was a problem hiding this comment.
If this is done, it should be consistently done for exif_imagetype() as well.
So I'm not sure whether that's really a good motivation here. |
|
I think fast ZPP is indirectly more secure, because null-safety is part of it. |
I don't understand what you mean? |
PHP_FUNCTION(my_function)
{
zend_string *my_str;
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_STR(my_str)
ZEND_PARSE_PARAMETERS_END();
php_printf("String value: '%s'\n", ZSTR_VAL(my_str)); //This value is never NULL
} |
|
Sorry, I’m confused. |
I don't see why this is an issue with "old" ZPP? Especially fast ZPP can still have this issue if the parameter is optional. |
|
Thank you |
This replaces
zend_parse_parameters()with theZEND_PARSE_PARAMETERS_START/ENDmacros, which provideexception-aware parameter parsing and align the code with modern
php-srcconventions.