mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Fix TSRM build
This commit is contained in:
parent
35a8ed2f62
commit
40bd921cea
2 changed files with 2 additions and 0 deletions
|
@ -67,6 +67,7 @@ PHPAPI unsigned char *php_base64_encode(const unsigned char *str, int length, in
|
|||
}
|
||||
|
||||
if (((size_t)length + 2) / 3 > INT_MAX/4 ) {
|
||||
TSRMLS_FETCH();
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "String too long, maximum is %d", INT_MAX/4);
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -522,6 +522,7 @@ PHPAPI char *php_url_encode(char const *s, int len, int *new_length)
|
|||
}
|
||||
|
||||
if ((to-start) > INT_MAX) {
|
||||
TSRMLS_FETCH();
|
||||
/* E_ERROR since most clients won't check for error, and this is rather rare condition */
|
||||
php_error_docref(NULL TSRMLS_CC, E_ERROR, "String overflow, max length is %d", INT_MAX);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue