Skip to content

Conversation

devnexen
Copy link
Member

Z_PARAM_STR*/Z_PARAM_PATH. lo_write checks any null byte.

Comment on lines 2797 to 2800
if (zend_str_has_nul_byte(str)) {
zend_argument_value_error(2, "must not contain any null bytes");
RETURN_THROWS();
}
Copy link
Member

Choose a reason for hiding this comment

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

Why don't you use the ZPP PATH specifier here?

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.

LGTM if CI is green.
Just saw a tiny nit, but that can be a follow-up PR.

Z_PARAM_PATH_STR(stmt)
ZEND_PARSE_PARAMETERS_END();

if (ZSTR_LEN(stmt) == 0) {
Copy link
Member

Choose a reason for hiding this comment

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

Nit I just saw, could you update the below argument value error to use the helper? Can be a follow-up PR.

Copy link
Member Author

Choose a reason for hiding this comment

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

no pb I can do it now it s nothing.

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.

2 participants