com php-src: Fix TSRM build: ext/standard/base64.c ext/standard/url.c
| From: | Ferenc Kovacs | Date: | Thu, 18 Aug 2016 10:53:53 +0000 |
| Subject: | com php-src: Fix TSRM build: ext/standard/base64.c ext/standard/url.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-93940@lists.php.net to get a copy of this message | ||
Commit: f01446dacf3eeab888b500115f0d71df7918c353
Author: Stanislav Malyshev <stas@php.net> Tue, 16 Aug 2016 16:34:35 -0700
Committer: Ferenc Kovacs <tyra3l@gmail.com> Thu, 18 Aug 2016 12:53:53 +0200
Parents: c35e4cb20cdeb02d9d362c57edce11c2948effcd
Branches: PHP-5.6.25
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f01446dacf3eeab888b500115f0d71df7918c353
Log:
Fix TSRM build
Changed paths:
M ext/standard/base64.c
M ext/standard/url.c
Diff:
diff --git a/ext/standard/base64.c b/ext/standard/base64.c
index 8340ed1..b30a5b7 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 8e471e1..dd861a5 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);
}