mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Fix bug #72674 - check both curl_escape and curl_unescape
This commit is contained in:
parent
1bcd439cad
commit
72dbb7f416
1 changed files with 6 additions and 2 deletions
|
@ -3517,7 +3517,7 @@ PHP_FUNCTION(curl_reset)
|
|||
PHP_FUNCTION(curl_escape)
|
||||
{
|
||||
char *str = NULL, *res = NULL;
|
||||
size_t str_len = 0;
|
||||
size_t str_len = 0;
|
||||
zval *zid;
|
||||
php_curl *ch;
|
||||
|
||||
|
@ -3529,6 +3529,10 @@ PHP_FUNCTION(curl_escape)
|
|||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if (ZEND_SIZE_T_INT_OVFL(str_len)) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if ((res = curl_easy_escape(ch->cp, str, str_len))) {
|
||||
RETVAL_STRING(res);
|
||||
curl_free(res);
|
||||
|
@ -3556,7 +3560,7 @@ PHP_FUNCTION(curl_unescape)
|
|||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if (str_len > INT_MAX) {
|
||||
if (ZEND_SIZE_T_INT_OVFL(str_len)) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue