summaryrefslogtreecommitdiff
path: root/ext/phar/dirstream.c
Commit message (Collapse)AuthorAgeFilesLines
* Report errors from stream read and write operationsNikita Popov2019-07-221-3/+3
| | | | | | | | | | | | | | | | | | The php_stream_read() and php_stream_write() functions now return an ssize_t value, with negative results indicating failure. Functions like fread() and fwrite() will return false in that case. As a special case, EWOULDBLOCK and EAGAIN on non-blocking streams should not be regarded as error conditions, and be reported as successful zero-length reads/writes instead. The handling of EINTR remains unclear and is internally inconsistent (e.g. some code-paths will automatically retry on EINTR, while some won't). I'm landing this now to make sure the stream wrapper ops API changes make it into 7.4 -- however, if the user-facing changes turn out to be problematic we have the option of clamping negative returns to zero in php_stream_read() and php_stream_write() to restore the old behavior in a relatively non-intrusive manner.
* Update and fix remaining year ranges (2019)Peter Kokot2019-02-081-1/+1
| | | | | | This patch follows previous license year ranges updates. With new approach source code files now have simplified headers with license information without year ranges.
* 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.
* Use HT_IS_INITIALIZED() and HT_INVALIDATE() macros instead of hackish ↵Dmitry Stogov2018-12-271-1/+1
| | | | HT_FLAGS assumtions.
* Removed useless checkDmitry Stogov2018-12-271-2/+1
|
* Removed "dead" code (zend_hash_update() never fails)Dmitry Stogov2018-06-011-1/+2
|
* Move to unsigned types in pharAnatol Belski2018-04-181-7/+7
| | | | | | Preventing integer overflows in principle, which allows to avoid additional range checks. The phar format is based on 32-bit lengths, so the storage sizes was kept same.
* Access HashTable.u.flags through HT_FLAGS() macro.Dmitry Stogov2018-01-221-3/+3
|
* year++Xinchen Hui2018-01-021-1/+1
|
* Move constants into read-only data segmentDmitry Stogov2017-12-141-1/+1
|
* Enable and fix printf() format warningsNikita Popov2017-11-161-1/+1
| | | | | | Add _unchecked() variants of zend_spprintf and zend_strpprintf for cases where we specifically want to disable these checks, such as use of %H.
* Refactor php_url struct to save memory dup in common casesXinchen Hui2017-08-061-29/+29
|
* Update copyright headers to 2017Sammy Kaye Powers2017-01-021-1/+1
|
* further normalizations, uint vs uint32_tAnatol Belski2016-11-261-9/+9
| | | | | | fix merge mistake yet one more replacement run
* fix useless assignmentAnatol Belski2016-09-011-1/+0
|
* Fixed compilation warningsDmitry Stogov2016-06-221-1/+1
|
* Merge branch 'PHP-5.6.18' into PHP-7.0.3Stanislav Malyshev2016-02-011-1/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * PHP-5.6.18: fix tests fix NEWS Update NEWS update NEWS Fixed bug #71488: Stack overflow when decompressing tar archives update NEWS add missing headers for SIZE_MAX backport the escapeshell* functions hardening branch add tests Fix bug #71459 - Integer overflow in iptcembed() prepare 5.6.18RC1 Fix test when run with openssl < 1.0.2 (reorder so no more SSLv2 message) Fix skip message to work improve fix for bug #71201 Fixed bug #71323 - Output of stream_get_meta_data can be falsified by its input Fix bug #71391: NULL Pointer Dereference in phar_tar_setupmetadata() Fixed bug #71331 - Uninitialized pointer in phar_make_dirstream() Fix bug #71335: Type Confusion in WDDX Packet Deserialization Fix bug #71354 - remove UMR when size is 0 Conflicts: configure.in ext/phar/dirstream.c ext/phar/phar_object.c ext/phar/tar.c ext/standard/exec.c ext/standard/iptc.c ext/standard/math.c ext/standard/streamsfuncs.c ext/wddx/wddx.c main/php_version.h main/streams/memory.c
| * Fixed bug #71331 - Uninitialized pointer in phar_make_dirstream()Stanislav Malyshev2016-01-141-1/+2
| |
* | Merge branch 'PHP-5.6' into PHP-7.0Lior Kaplan2016-01-011-1/+1
|\ \ | |/ | | | | | | * PHP-5.6: Happy new year (Update copyright to 2016)
| * Happy new year (Update copyright to 2016)Lior Kaplan2016-01-011-1/+1
| |
* | Merge branch 'PHP-5.6' into PHP-7.0Stanislav Malyshev2015-09-281-1/+1
|\ \ | |/ | | | | | | | | | | | | | | * PHP-5.6: Better fix for bug #70433 Conflicts: ext/phar/dirstream.c ext/phar/util.c
| * Merge branch 'PHP-5.5' into PHP-5.6Stanislav Malyshev2015-09-281-1/+1
| |\ | | | | | | | | | | | | | | | | | | | | | * PHP-5.5: Better fix for bug #70433 Conflicts: ext/phar/dirstream.c
| | * Better fix for bug #70433Stanislav Malyshev2015-09-281-1/+1
| | |
* | | Merge branch 'PHP-5.6' into PHP-7.0Stanislav Malyshev2015-09-281-1/+1
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | * PHP-5.6: fix memory leak FIx bug #70433 - Uninitialized pointer in phar_make_dirstream when zip entry filename is "/" Conflicts: ext/phar/dirstream.c
| * | Merge branch 'PHP-5.5' into PHP-5.6Stanislav Malyshev2015-09-281-1/+1
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | * PHP-5.5: fix memory leak FIx bug #70433 - Uninitialized pointer in phar_make_dirstream when zip entry filename is "/" Conflicts: ext/phar/dirstream.c
| | * FIx bug #70433 - Uninitialized pointer in phar_make_dirstream when zip entry ↵Stanislav Malyshev2015-09-281-1/+1
| | | | | | | | | | | | filename is "/"
| | * Bump yearXinchen Hui2015-01-151-1/+1
| | |
| | * Bump yearXinchen Hui2014-01-031-1/+1
| | |
| * | bump yearXinchen Hui2015-01-151-1/+1
| | |
* | | Use ZSTR_ API to access zend_string elements (this is just renaming without ↵Dmitry Stogov2015-06-301-22/+22
| | | | | | | | | | | | semantick changes).
* | | Use zend_string* instead of char* for opened_patch handling. Avoid ↵Dmitry Stogov2015-03-041-1/+1
| | | | | | | | | | | | reallocations and improve string reuse.
* | | bump yearXinchen Hui2015-01-151-1/+1
| | |
* | | Faster sorting algoXinchen Hui2015-01-141-1/+1
| | |
* | | trailing whitespace removalStanislav Malyshev2015-01-101-6/+6
| | |
* | | Use HashTable.u.flags instead of HashTable.arHash to check if HashTable is ↵Dmitry Stogov2014-12-301-3/+3
| | | | | | | | | | | | properly initialized
* | | Drop duplicate arg from hash_get_current_key_exNikita Popov2014-12-261-6/+5
| | |
* | | first shot remove TSRMLS_* thingsAnatol Belski2014-12-131-59/+59
| | |
* | | master renames phase 3Anatol Belski2014-08-251-1/+1
| | |
* | | master renames phase 1Anatol Belski2014-08-251-4/+4
| | |
* | | ported ext/pharAnatol Belski2014-08-191-5/+5
| | |
* | | Support for ext/phar (incomplete)Dmitry Stogov2014-05-081-39/+40
| | |
* | | Use better data structures (incomplete)Dmitry Stogov2014-02-101-5/+5
|/ /
* | Bump yearXinchen Hui2014-01-031-1/+1
| |
* | Merge branch 'PHP-5.5'Xinchen Hui2013-10-271-4/+0
|\ \ | |/
| * Merge branch 'PHP-5.4' into PHP-5.5Xinchen Hui2013-10-271-4/+0
| |\
| | * remove "PHP 6" staffXinchen Hui2013-10-271-4/+0
| | |
* | | Remove PHAR_(Z)STR* usagesNikita Popov2013-09-131-38/+8
| | |
* | | Constify streams API and a few other calls down the rabbit hole.Andrey Hristov2013-07-301-3/+3
|/ / | | | | | | | | (`char *` to `const char *` for parameters and few return values) In a few places int len moved to size_t len.
* | HASH_KEY_NON_EXISTANT fixVeres Lajos2013-07-211-5/+5
|/
* bump yearXinchen Hui2013-01-061-1/+1
|