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
Fixes for ZPP string arguments (and stuff) #810
Conversation
@@ -1426,7 +1427,8 @@ static void php_sybase_query (INTERNAL_FUNCTION_PARAMETERS, int buffered) | |||
zval *sybase_link_index = NULL; | |||
zend_bool store = 1; | |||
char *query; | |||
size_t len, id, deadlock_count; | |||
size_t len, deadlock_count; | |||
int id; |
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.
deadlock_count doesn't sound very size_t
ish. Also used with %d
below.
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.
Fixed! 😺
Is this PR still relevant now ? |
There are still relevant parts here. One change in interbase.c and several in mbstring relating to the mbfl_string structure. I wonder how mbfl_string interacts with our ABI, can we change it in a patch release? |
Interbase fix: a7028d9 We do export the mbfl_string structure in headers, so can't change it for 7.0. So we should port mbfl to use size_t in master and use the solution in this PR for 7.0. |
@weltling Thanks! With that commit all changes from this PR should be covered, so closing here. |
I stepped through all usages of
zend_parse_parameters()
in all core extensions except forext/standard
to make sure the correct type is used for the string length.At the same time I've looked at overzealous replacements of
int
withsize_t
; some values work with negative numbers and as such should remain asint
.Finally, some minor inconsistencies were addressed.
This is a PR for two reasons: