diff options
author | Dmitry Stogov <dmitry@zend.com> | 2017-10-30 12:11:35 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2017-10-30 12:11:35 +0300 |
commit | fad75a54d4da2c9f399f3ee585b640b91a5cfe77 (patch) | |
tree | 35742a6ab69c37e125f53ee7f62ebd58b9122fd7 /ext/zip/lib/zip_open.c | |
parent | 8203a0668d1ec4d667336f8f3be469873d740911 (diff) | |
parent | e4a8b7a4b6f29fbaf18b6c4695b52114dff4b60c (diff) | |
download | php-git-fad75a54d4da2c9f399f3ee585b640b91a5cfe77.tar.gz |
Merge branch 'master' into rc_debug
* master: (26 commits)
Better fix for bug #75451 (Assertion fails while foreach on empty xpath query)
Catch with the latest AppVeyor unzip errors
Fixed type inference
Fix bug #75453 Incorrect reflection on ibase_connect and ibase_pconnect
Fix compiler warnings
We don't use a specific model for a MAKERNOTE so remove these checks that doesn't do anything anyway
Remove these old comments, as for the TODO, there is already a FR for this
Re-enable AppVeyor cache
make sure run-tests reports exit status upon prerequisite error
Remove implicit constants from test case
Fix invalid read in zend_use_undefined_constant()
Fix invalid read in mb_ord()
Remove --with-libmbfl configure option
Fixed bug #75451 (Assertion fails while foreach on empty xpath query)
Add tests for UConverter::getStandards()
convert spaces to tabs in ext/ftp/tests/server.inc
Add tests for ftp_rename
Fix bug #75434 Wrong reflection for mysqli_fetch_all function
Don't optimize input arrays with suffix holes
Fix bug #75307 Wrong reflection for openssl_open function
...
Diffstat (limited to 'ext/zip/lib/zip_open.c')
-rw-r--r-- | ext/zip/lib/zip_open.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/zip/lib/zip_open.c b/ext/zip/lib/zip_open.c index d6209ee1e7..29409b747d 100644 --- a/ext/zip/lib/zip_open.c +++ b/ext/zip/lib/zip_open.c @@ -837,7 +837,12 @@ _zip_read_eocd64(zip_source_t *src, zip_buffer_t *buffer, zip_uint64_t buf_offse zip_error_set(error, ZIP_ER_SEEK, EFBIG); return NULL; } - if ((flags & ZIP_CHECKCONS) && offset+size != eocd_offset) { + if (offset+size > buf_offset + eocd_offset) { + /* cdir spans past EOCD record */ + zip_error_set(error, ZIP_ER_INCONS, 0); + return NULL; + } + if ((flags & ZIP_CHECKCONS) && offset+size != buf_offset + eocd_offset) { zip_error_set(error, ZIP_ER_INCONS, 0); return NULL; } |