summaryrefslogtreecommitdiff
path: root/ext/phar
Commit message (Collapse)AuthorAgeFilesLines
* Avoid unused fstat() callNikita Popov2019-07-171-6/+0
| | | | | | | | If we're including a file via PHP streams, we're not going to trust the reported file size anyway and populate in a loop -- so don't bother determining the file size in the first place. Only do this for non-tty HANDLE_FP now, which is the only case where this information was used.
* Remove ZEND_HANDLE_MAPPEDNikita Popov2019-07-161-2/+0
| | | | | The buf/len members are now simply used in addition to the main stream, without changing the handle kind.
* Drop free_filename field from zend_file_handleNikita Popov2019-07-161-1/+0
| | | | free_filename was always zero.
* Introduce zend_stream_init_filename()Nikita Popov2019-07-161-4/+1
| | | | Avoid more ad-hoc initialization of zend_file_handle structures.
* Remove ZEND_HANDLE_FDNikita Popov2019-07-161-1/+0
| | | | This handle type was unused.
* Use ZEND_HASH_FOREACH APIs in a few more placesNikita Popov2019-07-161-46/+12
|
* Remove unused tsrm_strtok_r() functionNikita Popov2019-07-121-5/+0
| | | | | There is also a php_strtok_r() function, which is actually used, but nothing uses the tsrm_strtok_r() variant...
* Fix file collisions in phar testsNikita Popov2019-07-103-21/+21
|
* Fix phar tests with hash extensionPeter Kokot2019-06-3010-133/+1
| | | | | | | - The hash extension is now always available. - Remove unfinished test The Phar::PGP currently doesn't exist yet.
* Sync HAVE_HASH, HAVE_HASH_EXT, PHAR_HASH_OK symbolsPeter Kokot2019-06-2712-76/+2
| | | | | | | | The hash extension is always available since PHP-7.4. The symbol HAVE_HASH_EXT is kept for BC reasons and removed in PHP-8.0. This patch also removes the PHAR_HASH_OK since it is no longer relevant.
* Fix stream leak in phar cache_listNikita Popov2019-06-251-1/+1
|
* Avoid confusing gotos in phar_split_cache_listNikita Popov2019-06-251-28/+24
|
* Fix EVP_PKEY leak in pharNikita Popov2019-06-251-1/+7
|
* Fix uninitialized variableNikita Popov2019-06-191-1/+1
| | | | I mistakenly moved len1 initialization into the conditional as well.
* Phar: Avoid negative zip datesNikita Popov2019-06-191-2/+9
| | | | The zip date/time encoding format is incredibly stupid.
* Fix memcpy null UB in pharNikita Popov2019-06-191-2/+4
|
* this mtime comparison makes assumptions that cannot always hold trueJoe Watkins2019-06-161-5/+0
|
* Prevent test conflictsChristoph M. Becker2019-05-143-0/+6
|
* Normalize comments in *nix build system m4 filesPeter Kokot2019-05-121-2/+0
| | | | | | | | | Normalization include: - Use dnl for everything that can be ommitted when configure is built in favor of the shell comment character # which is visible in the output. - Line length normalized to 80 columns - Dots for most of the one line sentences - Macro definitions include similar pattern header comments now
* Fix undefined variable, and remove unused test-pdopeter279k2019-05-031-1/+1
|
* Fix VirtualProtect() related Phar issuesChristoph M. Becker2019-04-262-26/+81
| | | | | | | | | | | | | | We must not (try to) modify shared values, but rather have to use our own copies, if unixified filenames are required on Windows. To avoid excessive string duplication, we add checks whether the filenames are already unixified (i.e. do not contain backslashes). To improve the performance if we need to copy strings, we use do_alloca() and friends. Besides generally being somewhat messy, the handling of unixified filenames is still suboptimal performance-wise, but we leave this for a future cleanup, and focus on fixing the issue at hand for now. We also enable opcache.protect_memory for the AppVeyor CI.
* Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2019-04-172-2/+2
|\ | | | | | | | | * PHP-7.3: Fix tests for non English environments
| * Merge branch 'PHP-7.2' into PHP-7.3Christoph M. Becker2019-04-172-2/+2
| |\ | | | | | | | | | | | | * PHP-7.2: Fix tests for non English environments
| | * Fix tests for non English environmentsChristoph M. Becker2019-04-172-2/+2
| | |
* | | Merge branch 'PHP-7.3' into PHP-7.4Anatol Belski2019-04-101-0/+61
|\ \ \ | |/ / | | | | | | | | | * PHP-7.3: Fix phar:// include handling with file cache
| * | Merge branch 'PHP-7.2' into PHP-7.3Anatol Belski2019-04-101-0/+61
| |\ \ | | |/ | | | | | | | | | * PHP-7.2: Fix phar:// include handling with file cache
| | * Fix phar:// include handling with file cacheAnatol Belski2019-04-101-0/+61
| | |
* | | Replace dirname(__FILE__) by __DIR__ in testsFabien Villepinte2019-03-15312-1015/+1015
| | |
* | | Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2019-03-151-2/+3
|\ \ \ | |/ /
| * | Fixed bug #77697 (Crash on Big_Endian platform)Xinchen Hui2019-03-151-2/+3
| | |
* | | Add AS_HELP_STRING to *nix build configure optionsPeter Kokot2019-03-071-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | The Autoconf's default AS_HELP_STRING macro can properly format help strings [1] so watching out if columns are aligned manually is not anymore. [1] https://www.gnu.org/software/autoconf/manual/autoconf.html#Pretty-Help-Strings
* | | More zpp error/variation test removalsNikita Popov2019-03-073-107/+0
| | |
* | | Merge branch 'PHP-7.3' into PHP-7.4Anatol Belski2019-03-041-3/+3
|\ \ \ | |/ / | | | | | | | | | * PHP-7.3: Fix test portability
| * | Merge branch 'PHP-7.2' into PHP-7.3Anatol Belski2019-03-041-3/+3
| |\ \ | | |/ | | | | | | | | | * PHP-7.2: Fix test portability
| | * Fix test portabilityAnatol Belski2019-03-041-3/+3
| | |
* | | Merge branch 'PHP-7.3' into PHP-7.4Stanislav Malyshev2019-03-034-3/+31
|\ \ \ | |/ / | | | | | | | | | * PHP-7.3: Fix bug #77586 - phar_tar_writeheaders_int() buffer overflow
| * | Merge branch 'PHP-7.2' into PHP-7.3Stanislav Malyshev2019-03-034-3/+31
| |\ \ | | |/ | | | | | | | | | * PHP-7.2: Fix bug #77586 - phar_tar_writeheaders_int() buffer overflow
| | * Merge branch 'PHP-7.1' into PHP-7.2Stanislav Malyshev2019-03-034-3/+31
| | |\ | | | | | | | | | | | | | | | | * PHP-7.1: Fix bug #77586 - phar_tar_writeheaders_int() buffer overflow
| | | * Fix bug #77586 - phar_tar_writeheaders_int() buffer overflowStanislav Malyshev2019-03-034-3/+31
| | | |
* | | | Merge branch 'PHP-7.3' into PHP-7.4Stanislav Malyshev2019-03-032-0/+18
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * PHP-7.3: Update NEWS Fix test error message Fix bug #77563 - Uninitialized read in exif_process_IFD_in_MAKERNOTE Fix bug #77540 - Invalid Read on exif_process_SOFn Fix integer overflows on 32-bits Fix #77431 SplFileInfo::__construct() accepts NUL bytes Fix bug #77396 - Null Pointer Dereference in phar_create_or_parse_filename
| * | | Merge branch 'PHP-7.2' into PHP-7.3Stanislav Malyshev2019-03-032-0/+18
| |\ \ \ | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * PHP-7.2: Update NEWS Fix test error message Fix bug #77563 - Uninitialized read in exif_process_IFD_in_MAKERNOTE Fix bug #77540 - Invalid Read on exif_process_SOFn Fix integer overflows on 32-bits Fix #77431 SplFileInfo::__construct() accepts NUL bytes Fix bug #77396 - Null Pointer Dereference in phar_create_or_parse_filename
| | * | Merge branch 'PHP-7.1' into PHP-7.2Stanislav Malyshev2019-03-032-0/+18
| | |\ \ | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * PHP-7.1: Update NEWS Fix test error message Fix bug #77563 - Uninitialized read in exif_process_IFD_in_MAKERNOTE Fix bug #77540 - Invalid Read on exif_process_SOFn Fix integer overflows on 32-bits Fix #77431 SplFileInfo::__construct() accepts NUL bytes Fix bug #77396 - Null Pointer Dereference in phar_create_or_parse_filename
| | | * Fix bug #77396 - Null Pointer Dereference in phar_create_or_parse_filenameStanislav Malyshev2019-03-032-0/+18
| | | |
* | | | Fix more file name collisions in phar testsNikita Popov2019-02-222-11/+11
| | | |
* | | | Use separate files in phar testsNikita Popov2019-02-228-75/+75
| | | |
* | | | Update and fix remaining year ranges (2019)Peter Kokot2019-02-0819-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | 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-0314-126/+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.
* | | | Fix some sign-related issues in comparisonsjvoisin2019-01-091-1/+1
| | | |
* | | | Merge branch 'PHP-7.3'Stanislav Malyshev2019-01-062-1/+15
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * PHP-7.3: Fix #77367: Negative size parameter in mb_split Fix #77369 - memcpy with negative length via crafted DNS response Fix more issues with encodilng length Fix #77270: imagecolormatch Out Of Bounds Write on Heap Fix bug #77380 (Global out of bounds read in xmlrpc base64 code) Fix bug #77371 (heap buffer overflow in mb regex functions - compile_string_node) Fix bug #77370 - check that we do not read past buffer end when parsing multibytes Fix #77269: Potential unsigned underflow in gdImageScale Fix bug #77247 (heap buffer overflow in phar_detect_phar_fname_ext) Fix bug #77242 (heap out of bounds read in xmlrpc_decode()) Regenerate certs for openssl tests
| * | | Merge branch 'PHP-7.2' into PHP-7.3Stanislav Malyshev2019-01-062-1/+15
| |\ \ \ | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * PHP-7.2: Fix #77369 - memcpy with negative length via crafted DNS response Fix more issues with encodilng length Fix #77270: imagecolormatch Out Of Bounds Write on Heap Fix bug #77380 (Global out of bounds read in xmlrpc base64 code) Fix bug #77371 (heap buffer overflow in mb regex functions - compile_string_node) Fix bug #77370 - check that we do not read past buffer end when parsing multibytes Fix #77269: Potential unsigned underflow in gdImageScale Fix bug #77247 (heap buffer overflow in phar_detect_phar_fname_ext) Fix bug #77242 (heap out of bounds read in xmlrpc_decode()) Regenerate certs for openssl tests