Skip to content

Commit 3800e1c

Browse files
committed
Fixed bug #72743 (Out-of-bound read in php_stream_filter_create)
1 parent 5b547af commit 3800e1c

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

‎NEWS‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ PHP NEWS
55
- EXIF:
66
. Fixed bug #72735 (Samsung picture thumb not read (zero size)). (Kalle, Remi)
77

8+
- Stream:
9+
. Fixed bug #72743 (Out-of-bound read in php_stream_filter_create).
10+
(Loianhtuan)
11+
812
04 Aug 2016, PHP 7.1.0beta2
913

1014
- Core:

‎main/streams/filter.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,10 +252,10 @@ PHPAPI php_stream_filter *php_stream_filter_create(const char *filtername, zval
252252
HashTable *filter_hash = (FG(stream_filters) ? FG(stream_filters) : &stream_filters_hash);
253253
php_stream_filter_factory *factory = NULL;
254254
php_stream_filter *filter = NULL;
255-
int n;
255+
size_t n;
256256
char *period;
257257

258-
n = (int)strlen(filtername);
258+
n = strlen(filtername);
259259

260260
if (NULL != (factory = zend_hash_str_find_ptr(filter_hash, filtername, n))) {
261261
filter = factory->create_filter(filtername, filterparams, persistent);

0 commit comments

Comments
 (0)