summaryrefslogtreecommitdiff
path: root/ext/standard/streamsfuncs.c
Commit message (Collapse)AuthorAgeFilesLines
* Add VT100 support for WindowsMichele Locati2016-10-281-0/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix function names prefix Use Unicode version of GetFinalPathNameByHandle Use EG(windows_version_info) instead of RtlGetVersion Use the specified handle_id instead of STD_OUTPUT_HANDLE Switch from stream name to stream resource Allow running tests capturing only stdout and/or stderr Add tests for stream_vt100_support function Export Win32 console functions Fix x64 build Use zend_long instead of long long, use GetConsole instead of GetFinalPathNameByHandleW to check if a handle is a valid console stream Always use zend_long on any platform Use _get_osfhandle to determine the standard handle Accept stream names Raise warnings in case of invalid stream parameter Return true if disabling VT100 support on a not-console/redirected stream or on old Windows versions Remove php_win32_console_os_supports_vt100 Differentiate stdin vs stdout/stderr Simplify setting flag Allow avoid piping STDIN Let stream_vt100_support accept only resources Fix run-tests Revert console flags in case of failure Simplify logic of stream_vt100_support when setting the flag Return true if succeeded, false otherwise Drop support for STDIN More comprehensive tests for stream_vt100_support Remove old tests Fix name of included file and use absolute paths Enable ENABLE_VIRTUAL_TERMINAL_PROCESSING on Windows by default Remove tests for stream_vt100_support Split stream_vt100_support into stream_isatty+sapi_windows_vt100_support Add tests for stream_isatty Add tests for sapi_windows_vt100_support Return null from stream_isatty is neither Windows nor Posix Fallback to S_ISCHR if neither Windows nor Posix Avoid defining argc since it's only used once Better comment about php_win32_console_fileno_is_console Use events instead of cNumberOfEvents Do not restore previous console mode We need to restore previous console mode on failing SetConsole calls only for STDIN Don't configure STDOUT/STDERR on Windows with PHP_CLI_WIN32_NO_CONSOLE
* Merge branch 'PHP-7.0' into PHP-7.1Andrea Faulds2016-09-111-72/+0
|\
| * Remove zpp fallback code (always use Fast ZPP)Andrea Faulds2016-09-111-72/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Squashed commit of the following: commit 3e27fbb3d22b42d181e15c345f1c59a007b6b58c Author: Andrea Faulds <ajf@ajf.me> Date: Sun Sep 11 19:14:37 2016 +0100 Keep dummy FAST_ZPP macro for compatibility commit 8a7cfd00deaa4a3c5026c97580c49c886c72a5b4 Author: Andrea Faulds <ajf@ajf.me> Date: Mon Sep 5 22:36:03 2016 +0100 Remove FAST_ZPP macro and plain zpp fallback code
* | Merge branch 'PHP-7.0' into PHP-7.1Andrea Faulds2016-09-051-2/+2
|\ \ | |/
| * Unbreak FAST_ZPP dead codeAndrea Faulds2016-09-051-2/+2
| |
* | Merge branch 'PHP-7.0' into PHP-7.1Anatol Belski2016-08-161-1/+1
|\ \ | |/ | | | | | | * PHP-7.0: Fixed #72857 stream_socket_recvfrom read access violation
| * Fixed #72857 stream_socket_recvfrom read access violationAnatol Belski2016-08-161-1/+1
| |
* | Merge branch 'PHP-7.0'Anatol Belski2016-07-031-1/+1
|\ \ | |/ | | | | | | | | | | * PHP-7.0: update NEWS extend test Fixed bug #72534 stream_socket_get_name crashes
| * Fixed bug #72534 stream_socket_get_name crashesAnatol Belski2016-07-031-1/+1
| |
* | Added ZEND_ATTRIBUTE_FORMAT to some middind functions.Dmitry Stogov2016-06-211-2/+2
|/ | | | | "%p" replaced by ZEND_LONG_FMT to avoid compilation warnings. Fixed most incorrect use cases of format specifiers.
* Fixed bug #72075 (Referencing socket resources breaks stream_select)Xinchen Hui2016-04-221-0/+3
|
* Fixed Bug #71884 (Null pointer deref (segfault) in stream_context_get_default)Xinchen Hui2016-03-231-3/+2
|
* Merge branch 'PHP-5.6.18' into PHP-7.0.3Stanislav Malyshev2016-02-011-5/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
| * Merge branch 'PHP-5.5.32' into PHP-5.6.18Stanislav Malyshev2016-02-011-10/+10
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * PHP-5.5.32: 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() 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() Fix bug #71335: Type Confusion in WDDX Packet Deserialization Fix bug #71354 - remove UMR when size is 0
| | * Fixed bug #71323 - Output of stream_get_meta_data can be falsified by its inputStanislav Malyshev2016-01-161-10/+10
| | |
* | | 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
| | |
* | | This should be betterXinchen Hui2015-12-301-1/+0
| | |
* | | Fixed bug #71245 (file_get_contents() ignores "header" context option if ↵Xinchen Hui2015-12-301-2/+3
| | | | | | | | | | | | it's a reference)
* | | Internal function argumensts cleanup (strict_types)Xinchen Hui2015-12-121-1/+1
| | |
* | | Add FAST_ZPP to various important stream funcsBob Weinand2015-09-201-58/+145
| | |
* | | Fixed bug #69521 (Segfault in gc_collect_cycles()).Xinchen Hui2015-07-021-9/+4
| | |
* | | Use ZSTR_ API to access zend_string elements (this is just renaming without ↵Dmitry Stogov2015-06-301-9/+9
| | | | | | | | | | | | semantick changes).
* | | Get rid of more ZVAL_ZVAL() macrosDmitry Stogov2015-06-121-1/+1
| | |
* | | Avoid zval duplication in ZVAL_ZVAL() macro (it was necessary only in few ↵Dmitry Stogov2015-06-121-2/+2
| | | | | | | | | | | | | | | | | | places). Switch from ZVAL_ZVAL() to simpler macros where possible (it makes sense to review remaining places)
* | | Fixes for x32 ABINikita Popov2015-05-231-1/+1
| | | | | | | | | | | | | | | | | | | | | I'm assuming that we want to have 64bit zend_longs on x32 here. This fixes two typos in __x86_64__ macros and adds sign-extension when assigning STREAM_COPY_ALL to zend_long.
* | | Merge branch 'PHP-5.6'Stanislav Malyshev2015-04-141-1/+1
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * PHP-5.6: (27 commits) fix non-standard C update NEWS 5.4.41 next fix CVE num update NEWS Fix bug #69441 (Buffer Overflow when parsing tar/zip/phar in phar_set_inode) fix test fix type in fix for #69085 fix memory leak & add test Fix tests fix CVE num Fix bug #69337 (php_stream_url_wrap_http_ex() type-confusion vulnerability) Fix test Additional fix for bug #69324 More fixes for bug #69152 Fixed bug #69353 (Missing null byte checks for paths in various PHP extensions) Fixed bug #69324 (Buffer Over-read in unserialize when parsing Phar) Fixed bug #69316 (Use-after-free in php_curl related to CURLOPT_FILE/_INFILE/_WRITEHEADER) Fix bug #68486 and bug #69218 (segfault in apache2handler with apache 2.4) Fix bug #68819 (Fileinfo on specific file causes spurious OOM and/or segfault) ... Conflicts: Zend/zend_exceptions.c ext/curl/interface.c ext/dom/document.c ext/fileinfo/libmagic/softmagic.c ext/gd/gd.c ext/hash/hash.c ext/pgsql/pgsql.c ext/phar/phar.c ext/phar/phar_internal.h ext/standard/http_fopen_wrapper.c ext/standard/link.c ext/standard/streamsfuncs.c ext/xmlwriter/php_xmlwriter.c ext/zlib/zlib.c
| * | Merge branch 'PHP-5.5' into PHP-5.6Stanislav Malyshev2015-04-141-1/+1
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * PHP-5.5: (27 commits) fix non-standard C update NEWS 5.4.41 next fix CVE num update NEWS Fix bug #69441 (Buffer Overflow when parsing tar/zip/phar in phar_set_inode) fix test fix type in fix for #69085 fix memory leak & add test Fix tests fix CVE num Fix bug #69337 (php_stream_url_wrap_http_ex() type-confusion vulnerability) Fix test Additional fix for bug #69324 More fixes for bug #69152 Fixed bug #69353 (Missing null byte checks for paths in various PHP extensions) Fixed bug #69324 (Buffer Over-read in unserialize when parsing Phar) Fixed bug #69316 (Use-after-free in php_curl related to CURLOPT_FILE/_INFILE/_WRITEHEADER) Fix bug #68486 and bug #69218 (segfault in apache2handler with apache 2.4) Fix bug #68819 (Fileinfo on specific file causes spurious OOM and/or segfault) ... Conflicts: ext/standard/http_fopen_wrapper.c
| | * Merge branch 'PHP-5.4.40' into PHP-5.5.24Stanislav Malyshev2015-04-111-1/+1
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * PHP-5.4.40: Additional fix for bug #69324 More fixes for bug #69152 Fixed bug #69353 (Missing null byte checks for paths in various PHP extensions) Fixed bug #69324 (Buffer Over-read in unserialize when parsing Phar) Fixed bug #69316 (Use-after-free in php_curl related to CURLOPT_FILE/_INFILE/_WRITEHEADER) Fix bug #68486 and bug #69218 (segfault in apache2handler with apache 2.4) Fix bug #68819 (Fileinfo on specific file causes spurious OOM and/or segfault) Fixed bug #68901 (use after free) Fixed bug #68740 (NULL Pointer Dereference) Fix bug #66550 (SQLite prepared statement use-after-free) Better fix for #68601 for perf https://bitbucket.org/libgd/gd-libgd/commits/81e9a993f2893d651d225646378e3fd1b7465467 Fix bug #68601 buffer read overflow in gd_gif_in.c Revert "Merge branch 'PHP-5.4' of https://git.php.net/repository/php-src into PHP-5.4" Fixed bug #69293 Add ZEND_ARG_CALLABLE_INFO to allow internal function to type hint against callable.
| | | * Fixed bug #69353 (Missing null byte checks for paths in various PHP extensions)Stanislav Malyshev2015-04-111-1/+1
| | | |
| | * | Bump yearXinchen Hui2015-01-151-1/+1
| | | |
| * | | bump yearXinchen Hui2015-01-151-1/+1
| | | |
* | | | Revert "Add stream_socket_crypto_info() function"Daniel Lowrey2015-03-091-40/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 13acb7ec653c543c56437ed417c3889fbf54f608. With the added capability to negotiate application layer protocols via the TLS ALPN extension userland needs a method to access the negotiated protocol on a given stream. The reverted commit added a new stream_socket_crypto_info() function for this purpose. This original approach was discarded in favor of using the already-existing stream_get_meta_data() API which specifically exists for just such purposes and requires the addition of no new functions.
* | | | Merge branch 'tls-alpn'Daniel Lowrey2015-03-041-0/+40
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tls-alpn: Improve test to target specific issue Misc updates/cleanup Add TLS ALPN extension support in crypto client/server streams Add stream_socket_crypto_info() function Update for compatibility with newer openssl libs
| * | | | Add TLS ALPN extension support in crypto client/server streamsDaniel Lowrey2015-02-281-0/+1
| | | | |
| * | | | Add stream_socket_crypto_info() functionDaniel Lowrey2015-02-281-0/+39
| | | | |
* | | | | Use zend_string* instead of char* for opened_patch handling. Avoid ↵Dmitry Stogov2015-03-041-5/+3
|/ / / / | | | | | | | | | | | | reallocations and improve string reuse.
* | | | found type is unnecessaryXinchen Hui2015-02-021-1/+1
| | | |
* | | | Cleanup resource handling APIsXinchen Hui2015-02-021-4/+4
| | | |
* | | | Optimized php_addslashesXinchen Hui2015-01-191-6/+5
| | | |
* | | | bump yearXinchen Hui2015-01-151-1/+1
| | | |
* | | | trailing whitespace removalStanislav Malyshev2015-01-101-4/+4
| | | |
* | | | second shot on removing TSRMLS_*Anatol Belski2014-12-141-3/+3
| | | |
* | | | first shot remove TSRMLS_* thingsAnatol Belski2014-12-131-112/+112
| | | |
* | | | fix datatype mismatchesAnatol Belski2014-10-241-15/+27
| | | |
* | | | s/PHP 5/PHP 7/Johannes Schlüter2014-09-191-1/+1
| | | |
* | | | first show to make 's' work with size_tAnatol Belski2014-08-271-7/+7
| | | |
* | | | master renames phase 7PRE_AST_MERGEAnatol Belski2014-08-251-1/+1
| | | |
* | | | master renames phase 3Anatol Belski2014-08-251-2/+2
| | | |
* | | | master renames phase 1Anatol Belski2014-08-251-68/+68
| | | |