diff options
-rw-r--r-- | ext/standard/base64.c | 1 | ||||
-rw-r--r-- | ext/standard/url.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/ext/standard/base64.c b/ext/standard/base64.c index 8340ed1260..b30a5b73b1 100644 --- a/ext/standard/base64.c +++ b/ext/standard/base64.c @@ -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; } diff --git a/ext/standard/url.c b/ext/standard/url.c index 8e471e12d8..dd861a570d 100644 --- a/ext/standard/url.c +++ b/ext/standard/url.c @@ -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); } |