Stanislav Malyshev
fd6874c64d
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix #78338 : Array cross-border reading in PCRE
2019-07-29 14:51:21 -07:00
Christoph M. Becker
8947fd9e9f
Fix #78338 : Array cross-border reading in PCRE
...
We backport r1092 from pcre2.
2019-07-29 14:49:33 -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
Christoph M. Becker
3429370d69
Fix build for --disable-signals
2019-07-29 18:49:44 +02:00
Nikita Popov
536c91c535
Merge branch 'PHP-7.3' into PHP-7.4
2019-07-29 17:34:37 +02:00
Nikita Popov
44fe025c28
Merge branch 'PHP-7.2' into PHP-7.3
2019-07-29 17:34:16 +02:00
Albert Casademont
dc7aa22b18
Fix bug #78326
...
Similar to what fread() does, truncate the stream_get_contents()
result if the original buffer was way too large.
2019-07-29 17:33:57 +02:00
Nikita Popov
6df1665bb3
Merge branch 'PHP-7.3' into PHP-7.4
2019-07-29 17:14:40 +02:00
Nikita Popov
bbed5564eb
Merge branch 'PHP-7.2' into PHP-7.3
2019-07-29 16:57:57 +02:00
Nikita Popov
38f1288b64
Fix Zend signals unblocking
...
There are a few parts here:
* opcache should not be blocking signals while invoking compile_file,
otherwise signals may remain blocked on a compile error. While at
it, also protect SHM memory during compile_file.
* We should deactivate Zend signals at the end of the request, to make
sure that we gracefully recover from a missing unblock and signals
don't remain blocked forever.
* We don't use a critical section in deactivation, because it should
not be necessary. Additionally we want to clean up the signal queue,
if it is non-empty.
* Enable SIGG(check) in debug builds so we notice issues in the future.
2019-07-29 15:17:32 +02:00
Christoph M. Becker
07286d2fb4
Document how to generate ffi_parser.c
2019-07-29 13:38:53 +02:00
Nikita Popov
a22a06c351
Merge branch 'PHP-7.3' into PHP-7.4
2019-07-29 13:03:53 +02:00
Nikita Popov
8e63bb5e46
Fixed bug #78341
...
The smart branch logic assumed b->start refers to the old offsets,
while b->start was already adjusted to the new offsets at this
point. Delay the change until later.
2019-07-29 13:02:01 +02:00
Nikita Popov
68fd435ba8
Fixed bug #78333
...
Don't dereference float/double values at unknown address, instead
memcpy it into an aligned stack slot and dereference that.
2019-07-29 11:27:21 +02:00
Nikita Popov
2eb159d589
Merge branch 'PHP-7.3' into PHP-7.4
2019-07-29 11:26:31 +02:00
Nikita Popov
727929765b
Merge branch 'PHP-7.2' into PHP-7.3
2019-07-29 11:26:09 +02:00
Nikita Popov
d142dfc93d
Fixed bug #78333
...
Don't dereference float/double values at unknown address, instead
memcpy it into an aligned stack slot and dereference that.
2019-07-29 11:25:27 +02:00
Stanislav Malyshev
aeb6d13185
Fix bug #78256 (heap-buffer-overflow on exif_process_user_comment)
2019-07-29 00:53:37 -07:00
Stanislav Malyshev
dea2989ab8
Fix bug #78222 (heap-buffer-overflow on exif_scan_thumbnail)
2019-07-29 00:53:28 -07:00
Christoph M. Becker
fec71e3f25
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix #78342 : Bus error in configure test for iconv //IGNORE
2019-07-29 08:51:33 +02:00
Christoph M. Becker
585131f901
Merge branch 'PHP-7.2' into PHP-7.3
...
* PHP-7.2:
Fix #78342 : Bus error in configure test for iconv //IGNORE
2019-07-29 08:50:39 +02:00
Christoph M. Becker
30eb4b3563
Fix #78342 : Bus error in configure test for iconv //IGNORE
...
We have to check the return value of iconv_open() for error, to avoid
that and potentially other undesired behavior of iconv().
2019-07-29 08:48:13 +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
1cbcf0f4f1
Throw notice for plain wrapper fread/fwrite errors
...
Similar to what is done for socket read/write errors.
2019-07-25 10:42:10 +02:00
Peter Kokot
dee243d475
Bump PHP_JSON_VERSION to PHP_VERSION
...
Closes GH-4459
2019-07-24 22:19:33 +02:00
Nikita Popov
626bc0e7cc
Remove php_openssl_cipher_get_version()
...
This was added in 7.1 when add_assoc_string mistakenly accepted
a char* rather than const char* parameter and is no longer needed.
We can use SSL_CIPHER_get_version() directly.
2019-07-24 16:41:20 +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
George Peter Banyard
6d6d954d0d
Cleanup of remaining E_STRICT in tests
2019-07-23 11:27:23 +02:00
Matteo Beccati
b19fdc18a9
Fix FR #71885 (Allow escaping question mark placeholders)
2019-07-22 19:35:03 +02:00
Peter Kokot
5d827c89cf
Remove HAVE_OCILOBISTEMPORARY and HAVE_OCICOLLASSIGN
...
Symbols are not used in the current code.
Also remove not needed ocijdbc8 library addition and checks whcih were
removed also via b8e1d4d4e5 so Oracle 8
is no longer supported.
Closes GH-4454
2019-07-22 19:13:24 +02:00
Nikita Popov
5664035ffe
Also report errors from Zend stream reader operation
2019-07-22 17:49:08 +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
Nikita Popov
c817b8020c
Special-case rc=1 self-referential arrays in ReflectionReference
...
New fix for bug #78263 . This is special-cased elsewhere in the engine,
so we need to mirror it here.
2019-07-22 16:59:23 +02:00
Nikita Popov
19588a8f3b
Revert "Add ReflectionReference::getRefcount()"
...
This reverts commit 428cfdd181 .
2019-07-22 16:49:08 +02:00
Remi Collet
31d85b8417
cleanup gd build with system libgd - drop need to use libpng with system libgd - drop need to use libjpeg with system libgd - drop need to use libXpm with system libgd - drop need to use libfreetype with system libgd - improve configure comments
2019-07-22 16:14:19 +02:00
Peter Kokot
a2b758dab5
Remove HAVE_PQPUTCOPYEND
...
Symbol is not used anywhere in the code and also Postgresql 7.x is
EOL anyway.
Closes GH-4453
2019-07-22 16:05:26 +02:00
Peter Kokot
4b03e102c5
Remove HAVE_DSA_DEFAULT_METHOD
...
Last usage removed via 6a81363405 .
Closes GH-4455
2019-07-22 16:02:55 +02:00
Christoph M. Becker
f8202b5513
Remove superfluous HAVE_GD_BUNDLED checks
...
If we're compiling the bundled libgd, `HAVE_GD_BUNDLED` is set, so
there is no need to check for this macro again.
2019-07-22 15:59:44 +02:00
Nikita Popov
6572c00b81
Merge branch 'PHP-7.4' of git.php.net:/php-src into PHP-7.4
2019-07-22 12:29:00 +02:00
Christoph M. Becker
d3d3404db7
Drop superfluous ENABLE_GD_TTF
...
If we `HAVE_LIBFREETYPE`, we define `ENABLE_GD_TTF` if it is not
defined. Therefore we can check for `HAVE_LIBFREETYPE` in the first
place.
2019-07-22 12:01:24 +02:00
Nikita Popov
b3f74b0b7d
Deprecate allow_url_include
2019-07-22 11:39:52 +02:00
Nikita Popov
964de035a7
Deprecate restore_include_path()
2019-07-22 11:39:52 +02:00
Nikita Popov
b3668aabf7
Deprecate convert_cyr_string()
2019-07-22 11:39:52 +02:00
Nikita Popov
e41b7f6db4
Deprecate (real) cast
2019-07-22 11:39:52 +02:00
Nikita Popov
46b982409a
Deprecate implode() with swapped parameter order
2019-07-22 11:39:52 +02:00
Nikita Popov
cd2f2cd7d0
Deprecate FILTER_SANITIZE_MAGIC_QUOTES
2019-07-22 11:39:52 +02:00
Nikita Popov
4e190691e2
Deprecate is_real() function
2019-07-22 11:39:52 +02:00