-
Couldn't load subscription status.
- Fork 8k
Zip upd master #20218
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
Zip upd master #20218
Conversation
|
not sure about callback registering parts (ie.zip_register_ * _with_state) if we should call zend_release_fcall_info_cache on failure especially it happens only during system OOM.. wdyt @Girgias ? |
4a699db to
6cd1355
Compare
|
|
Ok. if that s the case that ought to be a separate bug fix. |
6cd1355 to
60ee5da
Compare
ext/zip/php_zip.c
Outdated
| CWD_STATE_FREE(new_state.cwd); | ||
| return 0; | ||
| efree(new_state.cwd); | ||
| return true; |
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 believe this should be false.
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.
yes
| } | ||
| /* }}} */ | ||
|
|
||
| # define CWD_STATE_ALLOC(l) emalloc(l) |
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 don't think such abstraction macros are necessarily bad, but making the code directly use emalloc/efree seems fine too.
ext/zip/php_zip.c
Outdated
| size_t n; | ||
| int ret; | ||
|
|
||
| char *pattern = ZSTR_VAL(spattern); |
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.
this could be a const pointer, no?
| case IS_LONG: | ||
| break; | ||
| case IS_STRING: | ||
| if (Z_TYPE_P(zval_file) == IS_STRING) { |
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'm looking at the commit message. Indeed, it is weird that IS_LONG was accepted.
was IS_LONG to fetch by index eventually tough ??
60ee5da to
49b69b1
Compare
No description provided.