mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Merge branch 'PHP-5.4.40' into PHP-5.5-security
* PHP-5.4.40: Fixed bug #69316 (Use-after-free in php_curl related to CURLOPT_FILE/_INFILE/_WRITEHEADER) Fix bug #68486 and bug #69218 (segfault in apache2handler with apache 2.4) Fix bug #68819 (Fileinfo on specific file causes spurious OOM and/or segfault) Revert "Merge branch 'PHP-5.4' of https://git.php.net/repository/php-src into PHP-5.4" Fixed bug #69293 Add ZEND_ARG_CALLABLE_INFO to allow internal function to type hint against callable.
This commit is contained in:
commit
d19842f613
6 changed files with 92 additions and 0 deletions
|
@ -1354,6 +1354,7 @@ static size_t curl_write(char *data, size_t size, size_t nmemb, void *ctx)
|
|||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not call the CURLOPT_WRITEFUNCTION");
|
||||
length = -1;
|
||||
} else if (retval_ptr) {
|
||||
_php_curl_verify_handlers(ch, 1 TSRMLS_CC);
|
||||
if (Z_TYPE_P(retval_ptr) != IS_LONG) {
|
||||
convert_to_long_ex(&retval_ptr);
|
||||
}
|
||||
|
@ -1419,6 +1420,7 @@ static int curl_fnmatch(void *ctx, const char *pattern, const char *string)
|
|||
if (error == FAILURE) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot call the CURLOPT_FNMATCH_FUNCTION");
|
||||
} else if (retval_ptr) {
|
||||
_php_curl_verify_handlers(ch, 1 TSRMLS_CC);
|
||||
if (Z_TYPE_P(retval_ptr) != IS_LONG) {
|
||||
convert_to_long_ex(&retval_ptr);
|
||||
}
|
||||
|
@ -1497,6 +1499,7 @@ static size_t curl_progress(void *clientp, double dltotal, double dlnow, double
|
|||
if (error == FAILURE) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot call the CURLOPT_PROGRESSFUNCTION");
|
||||
} else if (retval_ptr) {
|
||||
_php_curl_verify_handlers(ch, 1 TSRMLS_CC);
|
||||
if (Z_TYPE_P(retval_ptr) != IS_LONG) {
|
||||
convert_to_long_ex(&retval_ptr);
|
||||
}
|
||||
|
@ -1574,6 +1577,7 @@ static size_t curl_read(char *data, size_t size, size_t nmemb, void *ctx)
|
|||
length = CURL_READFUNC_ABORT;
|
||||
#endif
|
||||
} else if (retval_ptr) {
|
||||
_php_curl_verify_handlers(ch, 1 TSRMLS_CC);
|
||||
if (Z_TYPE_P(retval_ptr) == IS_STRING) {
|
||||
length = MIN((int) (size * nmemb), Z_STRLEN_P(retval_ptr));
|
||||
memcpy(data, Z_STRVAL_P(retval_ptr), length);
|
||||
|
@ -1648,6 +1652,7 @@ static size_t curl_write_header(char *data, size_t size, size_t nmemb, void *ctx
|
|||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not call the CURLOPT_HEADERFUNCTION");
|
||||
length = -1;
|
||||
} else if (retval_ptr) {
|
||||
_php_curl_verify_handlers(ch, 1 TSRMLS_CC);
|
||||
if (Z_TYPE_P(retval_ptr) != IS_LONG) {
|
||||
convert_to_long_ex(&retval_ptr);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue