summaryrefslogtreecommitdiff
path: root/main/streams
diff options
context:
space:
mode:
authorXinchen Hui <laruence@gmail.com>2016-08-04 19:10:40 +0800
committerXinchen Hui <laruence@gmail.com>2016-08-04 19:10:40 +0800
commit3800e1cf970ce78c565e98803f799fa50737ecc6 (patch)
tree70a25271d994eb3337e86279c29d5717ccade616 /main/streams
parent5b547af1ad42e2372a8c6a0aff3e168c2c101452 (diff)
downloadphp-git-3800e1cf970ce78c565e98803f799fa50737ecc6.tar.gz
Fixed bug #72743 (Out-of-bound read in php_stream_filter_create)
Diffstat (limited to 'main/streams')
-rw-r--r--main/streams/filter.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/main/streams/filter.c b/main/streams/filter.c
index d063c1a915..e97dea9f21 100644
--- a/main/streams/filter.c
+++ b/main/streams/filter.c
@@ -252,10 +252,10 @@ PHPAPI php_stream_filter *php_stream_filter_create(const char *filtername, zval
HashTable *filter_hash = (FG(stream_filters) ? FG(stream_filters) : &stream_filters_hash);
php_stream_filter_factory *factory = NULL;
php_stream_filter *filter = NULL;
- int n;
+ size_t n;
char *period;
- n = (int)strlen(filtername);
+ n = strlen(filtername);
if (NULL != (factory = zend_hash_str_find_ptr(filter_hash, filtername, n))) {
filter = factory->create_filter(filtername, filterparams, persistent);