summaryrefslogtreecommitdiff
path: root/ext/zip/php_zip.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'PHP-7.3' into PHP-7.4Remi Collet2020-03-291-1/+2
|\ | | | | | | | | * PHP-7.3: Fix #79424 ext/zip: don't use gl_pathc after call to globfree
| * Fix #79424 ext/zip: don't use gl_pathc after call to globfreeMax Rees2020-03-291-1/+2
| | | | | | | | | | This breaks on Linux with the musl libc, since it zeroes out gl_pathc during globfree.
* | Merge branch 'PHP-7.3' into PHP-7.4Remi Collet2020-03-201-0/+15
|\ \ | |/ | | | | | | | | * PHP-7.3: NEWS Fix Bug #79296 ZipArchive::open fails on empty file
| * Fix Bug #79296 ZipArchive::open fails on empty fileRemi Collet2020-03-201-0/+15
| |
* | Merge branch 'PHP-7.3' into PHP-7.4Remi Collet2020-02-281-1/+2
|\ \ | |/ | | | | | | * PHP-7.3: Fix #79315 ZipArchive::addFile doesn't honor start/length parameters
| * Fix #79315 ZipArchive::addFile doesn't honor start/length parametersRemi Collet2020-02-281-1/+2
| |
* | Fixed bug #73119 Wrong return for ZipArchive::addEmptyDir MethodRemi Collet2020-02-031-3/+7
| |
* | zip: more constantsRemi Collet2020-01-291-0/+24
| |
* | - bump zip extension version to 1.15.6Remi Collet2020-01-271-0/+6
| | | | | | | | | | - add ZipArchive::LIBZIP_VERSION - skip bug53885.phpt with libzip 1.6.0 (empty file is no more valid archive)
* | Add ZipArchive::CM_LZMA2 constant (since libzip 1.6.0)Remi Collet2020-01-241-0/+3
| |
* | Remove unnecessary strncpy in zipNikita Popov2020-01-031-3/+2
| | | | | | | | | | | | This causes a warning on GCC 9 and is unnecessary to boot: We only use "cwd" for the open_basedir check, so we can just as well pass in the original string.
* | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2019-10-081-2/+6
|\ \ | |/ | | | | | | * PHP-7.3: Fix #78641: addGlob can modify given remove_path value
| * Merge branch 'PHP-7.2' into PHP-7.3Christoph M. Becker2019-10-081-2/+6
| |\ | | | | | | | | | | | | * PHP-7.2: Fix #78641: addGlob can modify given remove_path value
| | * Fix #78641: addGlob can modify given remove_path valueChristoph M. Becker2019-10-081-2/+6
| | | | | | | | | | | | | | | | | | | | | `remove_path` points to the given string, so we must not modify it. Instead we use a duplicate, if we need the modification. We may want to switch to `zend_string`s in master.
* | | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2019-09-291-0/+2
|\ \ \ | |/ / | | | | | | | | | * PHP-7.3: Fix build for libzip < 0.11.2
| * | Merge branch 'PHP-7.2' into PHP-7.3Christoph M. Becker2019-09-291-0/+2
| |\ \ | | |/ | | | | | | | | | * PHP-7.2: Fix build for libzip < 0.11.2
| | * Fix build for libzip < 0.11.2Christoph M. Becker2019-09-291-0/+2
| | | | | | | | | | | | | | | We must not define method entries, if the actual method definitions or the arginfo structures are not defined.
* | | fix type consistency afterRemi Collet2019-09-091-3/+3
| | | | | | | | | | | | 8f897f1040f00210f4a5cdd82a88a1fe3e558955
* | | Replace deprecated libzip functionsChristoph M. Becker2019-08-261-23/+42
| | | | | | | | | | | | | | | | | | We replace all deprecated libzip functions with their recommended substitutes, and add proper comment length checks including a test case.
* | | Remove dead codeChristoph M. Becker2019-08-131-11/+0
| | |
* | | php_zip_pcre: Match pattern before stating for directoriesNikita Popov2019-06-061-13/+13
| | | | | | | | | | | | | | | | | | | | | For two reasons: First, it's generally cheaper to match a regex than perform a stat (especially on Windows). Second, it will not fail on concurrent modification of a directory in parts that are not matched by the pattern, such as the spurious failure in ext/zip/tests/bug72660.phpt.
* | | Cheaper checks for exceptions thrown from __toString()Dmitry Stogov2019-06-061-12/+15
| | |
* | | Allow exceptions in __toString()Nikita Popov2019-06-051-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RFC: https://wiki.php.net/rfc/tostring_exceptions And convert some object to string conversion related recoverable fatal errors into Error exceptions. Improve exception safety of internal code performing string conversions.
* | | Use ZEND_TRY_ASSIGN_REF_... macros for arguments passed to internal function ↵Dmitry Stogov2019-04-241-4/+4
| | | | | | | | | | | | by reference
* | | Remove HAVE_* for always available extensionsGabriel Caruso2019-04-141-8/+0
| | |
* | | Remove unused variablesFabien Villepinte2019-03-171-3/+0
| | |
* | | Remove local variablesPeter Kokot2019-02-031-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes the so called local variables defined per file basis for certain editors to properly show tab width, and similar settings. These are mainly used by Vim and Emacs editors yet with recent changes the once working definitions don't work anymore in Vim without custom plugins or additional configuration. Neither are these settings synced across the PHP code base. A simpler and better approach is EditorConfig and fixing code using some code style fixing tools in the future instead. This patch also removes the so called modelines for Vim. Modelines allow Vim editor specifically to set some editor configuration such as syntax highlighting, indentation style and tab width to be set in the first line or the last 5 lines per file basis. Since the php test files have syntax highlighting already set in most editors properly and EditorConfig takes care of the indentation settings, this patch removes these as well for the Vim 6.0 and newer versions. With the removal of local variables for certain editors such as Emacs and Vim, the footer is also probably not needed anymore when creating extensions using ext_skel.php script. Additionally, Vim modelines for setting php syntax and some editor settings has been removed from some *.phpt files. All these are mostly not relevant for phpt files neither work properly in the middle of the file.
* | | Remove yearly range from copyright noticeZeev Suraski2019-01-301-1/+1
| | |
* | | Implement typed propertiesNikita Popov2019-01-111-10/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RFC: https://wiki.php.net/rfc/typed_properties_v2 This is a squash of PR #3734, which is a squash of PR #3313. Co-authored-by: Bob Weinand <bobwei9@hotmail.com> Co-authored-by: Joe Watkins <krakjoe@php.net> Co-authored-by: Dmitry Stogov <dmitry@zend.com>
* | | Remove preg_options param from pcre_get_compiled_regex()Nikita Popov2018-12-261-3/+3
| | | | | | | | | | | | | | | | | | | | | This parameter is always zero and not necessary to call pcre2_match. I'm leaving the parameter behind on the _ex() variant, so the preg_flags are still accessible in some way.
* | | Use ZEND_THIS macro to hide implementation details in extensions code.Dmitry Stogov2018-11-151-38/+38
| | |
* | | Replace getThis() by EX(This), when additional check is not necessary.Dmitry Stogov2018-11-141-191/+41
| | |
* | | Fix some misspellingsGabriel Caruso2018-08-121-2/+2
| | |
* | | Remove more unecessaries percent signsGabriel Caruso2018-08-081-2/+2
|/ / | | | | | | Follwing dae65a89
* | Merge branch 'PHP-7.2'Anatol Belski2018-07-101-2/+5
|\ \ | |/ | | | | | | * PHP-7.2: Fix bug #76524 - ZipArchive memory leak
| * Merge branch 'PHP-7.1' into PHP-7.2Anatol Belski2018-07-101-2/+5
| |\ | | | | | | | | | | | | * PHP-7.1: Fix bug #76524 - ZipArchive memory leak
| | * Fix bug #76524 - ZipArchive memory leaktimurib2018-07-101-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | Bugfix #76524: Free up zip internal state and adjust the tests for Windows Bugfix #76524: Fix possible use after free for libzip 1.3.1 Bugfix #76524: Make the test independent of platform
| | * year++Xinchen Hui2018-01-021-1/+1
| | |
* | | Fixed incorrrecr zval_dtor() usage to replace value of argument passed by ↵Dmitry Stogov2018-07-051-2/+2
| | | | | | | | | | | | reference, that may lead to memory leaks.
* | | Replace legacy zval_dtor() by zval_ptr_dtor_nogc() or even more specialized ↵Dmitry Stogov2018-07-041-5/+5
| | | | | | | | | | | | | | | | | | | | | destructors. zval_dtor() doesn't make a lot of sense in PHP-7.* and it's used incorrectly in some places. Its occurances should be replaced by zval_ptr_dtor() or zval_ptr_dtor_nogc(), or even more specialized destructors.
* | | Merge branch 'PHP-7.2'Remi Collet2018-06-121-1/+2
|\ \ \ | |/ / | | | | | | | | | | | | * PHP-7.2: NEWS Add OPSYS_CPM constant as documented and to match libzip naming
| * | Add OPSYS_CPM constant as documented and to match libzip namingRemi Collet2018-06-121-1/+2
| | |
| * | year++Xinchen Hui2018-01-021-1/+1
| | |
* | | Export standard object handlers, to avoid indirect accessDmitry Stogov2018-05-311-10/+4
| | |
* | | Use zend_string_release_ex() instread of zend_string_release() in places, ↵Dmitry Stogov2018-05-281-15/+15
| | | | | | | | | | | | where we sure about string persistence.
* | | Avoid useless checks, using zend_string_efree(), in cases where the string ↵Dmitry Stogov2018-05-081-2/+2
| | | | | | | | | | | | is known to be a temporary allocated zend_string.
* | | Keep initialized object_handlers structures in read-only memory.Dmitry Stogov2018-03-141-3/+3
| | |
* | | year++Xinchen Hui2018-01-021-1/+1
| | |
* | | Merge branch 'PHP-7.2'Remi Collet2017-12-191-0/+5
|\ \ \ | |/ / | | | | | | | | | | | | * PHP-7.2: NEWS display headers (buildtime) and library (runtime) versions in phpinfo (libzip >= 1.3.1)
| * | display headers (buildtime) and library (runtime) versions in phpinfo ↵Remi Collet2017-12-191-0/+5
| | | | | | | | | | | | (libzip >= 1.3.1)