-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Fix GH-13142: Undefined variable name is shortened when contains \0 #13200
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
Conversation
@@ -1650,6 +1650,20 @@ ZEND_API ZEND_COLD ZEND_NORETURN void zend_error_noreturn(int type, const char * | |||
abort(); | |||
} | |||
|
|||
ZEND_API ZEND_COLD ZEND_NORETURN void zend_error_noreturn_unchecked(int type, const char *format, ...) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the point of this function, it is 1:1 as zend_error_noreturn
above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The format attribute
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, ZEND_ATTRIBUTE_FORMAT
in .h
--FILE-- | ||
<?php | ||
|
||
$a = "test\0test"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be better if there were also tests in the case of \0test
and test\0
Thank you for adding the test case. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Merged in fe064d7 |
This uses the new %S modifier I introduced in 8d5c3e6
Also makes changes to php_verror such that it can handle strings containing \0