Skip to content

Commit

Permalink
Fix bug #72674 - check both curl_escape and curl_unescape
Browse files Browse the repository at this point in the history
  • Loading branch information
smalyshev committed Aug 3, 2016
1 parent 1bcd439 commit 72dbb7f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ext/curl/interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 72dbb7f

Please sign in to comment.