Christoph M. Becker
375ceefec0
Add missing zend_parse_parameters_none()
2019-10-05 18:22:01 +02:00
Stanislav Malyshev
e043025fda
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix #77919 : Potential UAF in Phar RSHUTDOWN
Update NEWS
Fix bug #78256 (heap-buffer-overflow on exif_process_user_comment)
Fix bug #78222 (heap-buffer-overflow on exif_scan_thumbnail)
2019-07-29 13:20:59 -07:00
Stanislav Malyshev
4adf3dc109
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix #77919 : Potential UAF in Phar RSHUTDOWN
Update NEWS
Fix bug #78256 (heap-buffer-overflow on exif_process_user_comment)
Fix bug #78222 (heap-buffer-overflow on exif_scan_thumbnail)
2019-07-29 13:20:52 -07:00
Stanislav Malyshev
d69894734d
Merge branch 'PHP-7.2' into PHP-7.3
...
* PHP-7.2:
Fix #77919 : Potential UAF in Phar RSHUTDOWN
Update NEWS
Fix bug #78256 (heap-buffer-overflow on exif_process_user_comment)
Fix bug #78222 (heap-buffer-overflow on exif_scan_thumbnail)
2019-07-29 13:20:44 -07:00
Stanislav Malyshev
284fb08fdc
Merge branch 'PHP-7.1' into PHP-7.2
...
* PHP-7.1:
Fix #77919 : Potential UAF in Phar RSHUTDOWN
Update NEWS
Fix bug #78256 (heap-buffer-overflow on exif_process_user_comment)
Fix bug #78222 (heap-buffer-overflow on exif_scan_thumbnail)
2019-07-29 13:19:16 -07:00
Christoph M. Becker
cd1101e8c8
Fix #77919 : Potential UAF in Phar RSHUTDOWN
...
We have to properly clean up in case phar_flush() is failing.
We also make the expectation of the respective test case less liberal
to avoid missing such bugs in the future.
2019-07-29 13:18:27 -07:00
Remi Collet
88a3e80dd1
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix build warnings
2019-07-25 11:50:57 +02:00
Remi Collet
946a1e4314
Fix build warnings
...
- switch from strncpy to memcpy for -Wstringop-truncation
2019-07-25 11:50:44 +02:00
Nikita Popov
173ebe4c44
Merge branch 'PHP-7.4'
2019-07-24 10:44:40 +02:00
Nikita Popov
d9680272c7
Revert "Drop free_filename field from zend_file_handle"
...
This reverts commit e0eca26285 .
free_filename is used by the wincache extension, restore this
field for PHP 7.4.
2019-07-24 10:43:37 +02:00
Nikita Popov
d37d418927
Merge branch 'PHP-7.4'
2019-07-23 11:28:10 +02:00
George Peter Banyard
6d6d954d0d
Cleanup of remaining E_STRICT in tests
2019-07-23 11:27:23 +02:00
Nikita Popov
ac555cf6ee
Merge branch 'PHP-7.4'
2019-07-22 17:56:38 +02:00
Nikita Popov
5664035ffe
Also report errors from Zend stream reader operation
2019-07-22 17:49:08 +02:00
Nikita Popov
a1e2c8870e
Merge branch 'PHP-7.4'
2019-07-22 17:26:01 +02:00
Nikita Popov
d59aac58b3
Report errors from stream read and write operations
...
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.
2019-07-22 17:17:28 +02:00
Peter Kokot
7d94c90374
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix failed tests for phar
2019-07-21 00:50:27 +02:00
Peter Kokot
b1643e166d
Fix failed tests for phar
...
- when $status is boolean, E_NOTICE appears and tests fail
- opcache is never enabled on these tests anyway.
- Add opcache.revalidate_freq=0 to testing script
Instead of checking this in the tests files it can be used directly in
the main testing script. Also this fixes failed tests.
- Use opcache_invalidate() instead of sleep() delay in some tests. Some
delays are still used since the opcache_invalidate seems to be buggy
and not working as expected.
Closes GH-4392
2019-07-21 00:49:35 +02:00
Peter Kokot
265bd7d039
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Remove safe_mode directive when installing ext/phar
2019-07-19 00:03:06 +02:00
Peter Kokot
7cbc6b6546
Remove safe_mode directive when installing ext/phar
...
Closes GH-4436
2019-07-19 00:02:12 +02:00
Nikita Popov
3c2f433b2b
Merge branch 'PHP-7.4'
2019-07-17 12:02:30 +02:00
Nikita Popov
856c5d2837
Revert "Avoid unused fstat() call"
...
This reverts commit 5a90dc77b8 .
Let's try to go with the reverse direction here and actually trust
the reported size...
2019-07-17 11:49:10 +02:00
Nikita Popov
995b391621
Merge branch 'PHP-7.4'
2019-07-17 11:22:41 +02:00
Nikita Popov
5a90dc77b8
Avoid unused fstat() call
...
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.
2019-07-17 11:22:31 +02:00
Nikita Popov
c4a6998c62
Merge branch 'PHP-7.4'
2019-07-16 17:45:03 +02:00
Nikita Popov
b317f0eb59
Remove ZEND_HANDLE_MAPPED
...
The buf/len members are now simply used in addition to the main
stream, without changing the handle kind.
2019-07-16 17:44:32 +02:00
Nikita Popov
e0eca26285
Drop free_filename field from zend_file_handle
...
free_filename was always zero.
2019-07-16 17:07:26 +02:00
Nikita Popov
3faa903d47
Merge branch 'PHP-7.4'
2019-07-16 16:44:46 +02:00
Nikita Popov
49bac9b77b
Introduce zend_stream_init_filename()
...
Avoid more ad-hoc initialization of zend_file_handle structures.
2019-07-16 16:44:37 +02:00
Nikita Popov
06cf349dc3
Merge branch 'PHP-7.4'
2019-07-16 15:48:24 +02:00
Nikita Popov
e08cc4d921
Remove ZEND_HANDLE_FD
...
This handle type was unused.
2019-07-16 15:47:10 +02:00
Nikita Popov
e36118a5c5
Merge branch 'PHP-7.4'
2019-07-16 12:20:21 +02:00
Nikita Popov
290e520c03
Use ZEND_HASH_FOREACH APIs in a few more places
2019-07-16 12:20:16 +02:00
Nikita Popov
98495f7f30
Merge branch 'PHP-7.4'
2019-07-12 13:14:38 +02:00
Nikita Popov
709897c2a5
Remove unused tsrm_strtok_r() function
...
There is also a php_strtok_r() function, which is actually used,
but nothing uses the tsrm_strtok_r() variant...
2019-07-12 13:14:24 +02:00
Nikita Popov
1cdc0d9056
Merge branch 'PHP-7.4'
2019-07-10 12:55:52 +02:00
Nikita Popov
07bbc54658
Fix file collisions in phar tests
2019-07-10 12:55:40 +02:00
Peter Kokot
8569a6740e
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix phar tests with hash extension
Fix missing file and remove SKIP section
2019-06-30 23:52:30 +02:00
Peter Kokot
839ff378bc
Fix phar tests with hash extension
...
- The hash extension is now always available.
- Remove unfinished test
The Phar::PGP currently doesn't exist yet.
2019-06-30 23:51:56 +02:00
Peter Kokot
221494f4de
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Sync HAVE_HASH, HAVE_HASH_EXT, PHAR_HASH_OK symbols
2019-06-27 23:29:11 +02:00
Peter Kokot
033cafacbd
Sync HAVE_HASH, HAVE_HASH_EXT, PHAR_HASH_OK symbols
...
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.
2019-06-27 23:25:33 +02:00
Nikita Popov
a1479fbbd9
Merge branch 'PHP-7.4'
2019-06-25 14:30:24 +02:00
Nikita Popov
c7962207d7
Fix stream leak in phar cache_list
2019-06-25 14:28:58 +02:00
Nikita Popov
d2a1fe8462
Merge branch 'PHP-7.4'
2019-06-25 10:26:20 +02:00
Nikita Popov
43dd1ac570
Avoid confusing gotos in phar_split_cache_list
2019-06-25 10:25:44 +02:00
Nikita Popov
31123de0c8
Fix EVP_PKEY leak in phar
2019-06-25 10:25:44 +02:00
Nikita Popov
bba88eb6a1
Merge branch 'PHP-7.4'
2019-06-19 15:36:31 +02:00
Nikita Popov
c10cb47b5f
Fix uninitialized variable
...
I mistakenly moved len1 initialization into the conditional as well.
2019-06-19 15:34:51 +02:00
Nikita Popov
3645292235
Merge branch 'PHP-7.4'
2019-06-19 15:09:39 +02:00
Nikita Popov
b1196e2128
Phar: Avoid negative zip dates
...
The zip date/time encoding format is incredibly stupid.
2019-06-19 15:09:00 +02:00