]>
granicus.if.org Git - php/log
Alex Dowad [Sun, 6 Sep 2020 10:09:02 +0000 (12:09 +0200)]
Remove useless validity check when converting UTF-16LE -> wchar
The check ensures that the decoded codepoint is between 0x10000-0x10FFFF,
which is the valid range which can be encoded in a UTF-16 surrogate pair.
However, just looking at the code, it's obvious that this will be true.
First of all, 0x10000 is added to the decoded codepoint on the previous
line, so how could it be less than 0x10000?
Further, even if the 20 data bits already decoded were 0xFFFFF (all ones),
when you add 0x10000, it comes to 0x10FFFF, which is the very top of the
valid range. So how could the decoded codepoint be more than 0x10FFFF?
It can't.
Alex Dowad [Mon, 10 Aug 2020 19:40:43 +0000 (21:40 +0200)]
Refactor UTF-16LE -> wchar conversion code
Alex Dowad [Sat, 19 Sep 2020 15:54:25 +0000 (17:54 +0200)]
Avoid compiler warnings related to mbstring flush functions
Christoph M. Becker [Mon, 12 Oct 2020 21:22:19 +0000 (23:22 +0200)]
Merge branch 'PHP-8.0' into master
* PHP-8.0:
Fix #80226: imap_sort() leaks sortpgm memory
Christoph M. Becker [Mon, 12 Oct 2020 21:21:35 +0000 (23:21 +0200)]
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
Fix #80226: imap_sort() leaks sortpgm memory
Dmitry Stogov [Mon, 12 Oct 2020 21:19:02 +0000 (00:19 +0300)]
Merge branch 'PHP-8.0'
* PHP-8.0:
Perform trace range propagation
Dmitry Stogov [Mon, 12 Oct 2020 21:18:17 +0000 (00:18 +0300)]
Perform trace range propagation
Christoph M. Becker [Mon, 12 Oct 2020 21:17:42 +0000 (23:17 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix #80226: imap_sort() leaks sortpgm memory
Christoph M. Becker [Mon, 12 Oct 2020 16:06:53 +0000 (18:06 +0200)]
Fix #80226: imap_sort() leaks sortpgm memory
We need to free what we have allocated.
Closes GH-6327.
Christoph M. Becker [Mon, 12 Oct 2020 21:10:41 +0000 (23:10 +0200)]
Merge branch 'PHP-8.0' into master
* PHP-8.0:
Change parameters types from int to bool
Christoph M. Becker [Mon, 12 Oct 2020 17:18:03 +0000 (19:18 +0200)]
Change parameters types from int to bool
These are typical boolean parameters, so we shouldn't advertize them as
integers. For the `$reverse` parameter that even fixes expectations,
because the `reverse` member is a bitfield of 1 bit, so assigning any
even integer would not set it.
Closes GH-6328.
Dmitry Stogov [Mon, 12 Oct 2020 19:59:48 +0000 (22:59 +0300)]
Merge branch 'PHP-8.0'
* PHP-8.0:
Eliminate dead stores
Dmitry Stogov [Mon, 12 Oct 2020 19:59:30 +0000 (22:59 +0300)]
Eliminate dead stores
Máté Kocsis [Mon, 12 Oct 2020 16:09:08 +0000 (18:09 +0200)]
Merge branch 'PHP-8.0'
Máté Kocsis [Fri, 9 Oct 2020 11:14:41 +0000 (13:14 +0200)]
Improve parameter names in ext/intl
Closes GH-6309
Máté Kocsis [Fri, 9 Oct 2020 21:02:14 +0000 (23:02 +0200)]
Improve parameter names in ext/pdo_sqlite
Closes GH-6310
Nikita Popov [Mon, 12 Oct 2020 14:44:46 +0000 (16:44 +0200)]
Merge branch 'PHP-8.0'
* PHP-8.0:
intl: report more information about message pattern parse errors
Nikita Popov [Mon, 12 Oct 2020 14:44:18 +0000 (16:44 +0200)]
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
intl: report more information about message pattern parse errors
Philip Hofstetter [Fri, 9 Oct 2020 09:55:33 +0000 (11:55 +0200)]
intl: report more information about message pattern parse errors
The message patterns can be pretty complex, so reporting a generic
U_PARSE_ERROR without any additional information makes it needlessly
hard to fix erroneous patterns.
This commit makes use of the additional UParseError* parameter to
umsg_open to retrieve more details about the parse error to report that
to the user via intl_get_error_message()
Additional improve error reporting from the IntlMessage constructor.
Previously, all possible failures when calling IntlMessage::__construct()
would be masked away with a generic "Constructor failed" message.
This would include invalid patterns.
This commit makes sure that the underlying error that caused the
constructor failure is reported as part of the IntlException error
message.
Closes GH-6325.
Nikita Popov [Mon, 12 Oct 2020 14:35:20 +0000 (16:35 +0200)]
Merge branch 'PHP-8.0'
* PHP-8.0:
Fixed bug #80225
Nikita Popov [Mon, 12 Oct 2020 14:34:19 +0000 (16:34 +0200)]
Fixed bug #80225
Namespaced and declares have a different interpretation of what
"first statement" means.
Christoph M. Becker [Mon, 12 Oct 2020 14:31:03 +0000 (16:31 +0200)]
Merge branch 'PHP-8.0' into master
* PHP-8.0:
Fix #80216: imap_mail_compose() does not validate types/encodings
Christoph M. Becker [Mon, 12 Oct 2020 14:30:34 +0000 (16:30 +0200)]
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
Fix #80216: imap_mail_compose() does not validate types/encodings
Christoph M. Becker [Mon, 12 Oct 2020 14:28:36 +0000 (16:28 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix #80216: imap_mail_compose() does not validate types/encodings
Christoph M. Becker [Mon, 12 Oct 2020 12:04:18 +0000 (14:04 +0200)]
Fix #80216: imap_mail_compose() does not validate types/encodings
We need to check whether the given `type`s and `encoding`s are within
bounds to avoid segfaults and out-of-bound reads.
Closes GH-6323.
Christoph M. Becker [Mon, 12 Oct 2020 13:10:55 +0000 (15:10 +0200)]
Merge branch 'PHP-8.0' into master
* PHP-8.0:
Fix #80223: imap_mail_compose() leaks envelope on malformed bodies
Christoph M. Becker [Mon, 12 Oct 2020 13:10:27 +0000 (15:10 +0200)]
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
Fix #80223: imap_mail_compose() leaks envelope on malformed bodies
Christoph M. Becker [Mon, 12 Oct 2020 13:09:15 +0000 (15:09 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix #80223: imap_mail_compose() leaks envelope on malformed bodies
Christoph M. Becker [Mon, 12 Oct 2020 11:26:38 +0000 (13:26 +0200)]
Fix #80223: imap_mail_compose() leaks envelope on malformed bodies
We have to clean up even on failure.
Closes GH-6322.
Christoph M. Becker [Mon, 12 Oct 2020 11:34:42 +0000 (13:34 +0200)]
Merge branch 'PHP-8.0' into master
* PHP-8.0:
Fix #80220: imap_mail_compose() may leak memory
Christoph M. Becker [Mon, 12 Oct 2020 11:34:07 +0000 (13:34 +0200)]
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
Fix #80220: imap_mail_compose() may leak memory
Christoph M. Becker [Mon, 12 Oct 2020 11:32:28 +0000 (13:32 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix #80220: imap_mail_compose() may leak memory
Christoph M. Becker [Mon, 12 Oct 2020 08:36:18 +0000 (10:36 +0200)]
Fix #80220: imap_mail_compose() may leak memory
Unless `topbod` is of `TYPEMULTIPART`, `mail_free_body()` does not free
the `nested.part`; while we could do this ourselves, instead we just
ignore additional bodies in this case, i.e. we don't attach them in the
first place.
Closes GH-6321.
Nikita Popov [Fri, 2 Oct 2020 08:53:21 +0000 (10:53 +0200)]
Add GC support for PDO driver data
Add a get_gc method that can be implemented by drivers, which can
be used to add additional zvals to the GC buffer.
Implement GC support for PDO SQLite callbacks in particular.
Closes GH-6262.
Nikita Popov [Mon, 12 Oct 2020 10:56:30 +0000 (12:56 +0200)]
Merge branch 'PHP-8.0'
* PHP-8.0:
Revert "Add missing X509 purpose constants"
Nikita Popov [Mon, 12 Oct 2020 10:56:21 +0000 (12:56 +0200)]
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
Revert "Add missing X509 purpose constants"
Nikita Popov [Mon, 12 Oct 2020 10:56:07 +0000 (12:56 +0200)]
Revert "Add missing X509 purpose constants"
This reverts commit
1e53e14bc31aec98a408e517c7c8493ef4bf80cd .
This fails on Travis.
Nikita Popov [Mon, 12 Oct 2020 09:53:59 +0000 (11:53 +0200)]
Merge branch 'PHP-8.0'
* PHP-8.0:
Add missing X509 purpose constants
Nikita Popov [Mon, 12 Oct 2020 09:53:22 +0000 (11:53 +0200)]
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
Add missing X509 purpose constants
Vincent JARDIN [Fri, 9 Oct 2020 22:14:06 +0000 (22:14 +0000)]
Add missing X509 purpose constants
X509_PURPOSE_OCSP_HELPER, X509_PURPOSE_TIMESTAMP_SIGN are available
from OpenSSL for many years:
- X509_PURPOSE_OCSP_HELPER, since 2001
- X509_PURPOSE_TIMESTAMP_SIGN, since 2006
Also drop the ifdef check for X509_PURPOSE_ANY, as it is always
available in supported OpenSSL versions.
Closes GH-6312.
Nikita Popov [Mon, 12 Oct 2020 09:25:36 +0000 (11:25 +0200)]
Merge branch 'PHP-8.0'
* PHP-8.0:
Detect self-addition of array more accurately
Deindirect source elements in zend_hash_merge
Nikita Popov [Mon, 12 Oct 2020 09:25:27 +0000 (11:25 +0200)]
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
Detect self-addition of array more accurately
Deindirect source elements in zend_hash_merge
Nikita Popov [Mon, 12 Oct 2020 09:24:59 +0000 (11:24 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Detect self-addition of array more accurately
Deindirect source elements in zend_hash_merge
Nikita Popov [Mon, 12 Oct 2020 09:22:39 +0000 (11:22 +0200)]
Detect self-addition of array more accurately
While the zvals may be different, they may still point to the
same array.
Fixes oss-fuzz #26245.
Nikita Popov [Mon, 12 Oct 2020 09:03:39 +0000 (11:03 +0200)]
Deindirect source elements in zend_hash_merge
If the RHS has INDIRECT elements, we do not those to be added to
the LHS verbatim. As we're using UPDATE_INDIRECT, we might even
create a nested INDIRECT that way.
This is a side-quest of oss-fuzz #26245.
Nikita Popov [Mon, 12 Oct 2020 08:07:01 +0000 (10:07 +0200)]
Merge branch 'PHP-8.0'
* PHP-8.0:
Backport schedule in yaml
Nikita Popov [Mon, 12 Oct 2020 08:06:30 +0000 (10:06 +0200)]
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
Backport schedule in yaml
Nikita Popov [Mon, 12 Oct 2020 08:05:37 +0000 (10:05 +0200)]
Backport schedule in yaml
I'm not sure it's needed, but let's try it: Add the scheduled
builds on PHP-7.4 and PHP-8.0 as well, rather than just master.
Nikita Popov [Mon, 12 Oct 2020 07:47:22 +0000 (09:47 +0200)]
Merge branch 'PHP-8.0'
* PHP-8.0:
Avoid non-object in FE_FREE
Nikita Popov [Mon, 12 Oct 2020 07:46:38 +0000 (09:46 +0200)]
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
Avoid non-object in FE_FREE
Nikita Popov [Mon, 12 Oct 2020 07:38:59 +0000 (09:38 +0200)]
Avoid non-object in FE_FREE
Even if the properties HT is empty, make sure we still leave an
object in the FE_RESET result, so our type inference results
stay correct.
Christoph M. Becker [Sun, 11 Oct 2020 16:50:49 +0000 (18:50 +0200)]
Merge branch 'PHP-8.0' into master
* PHP-8.0:
XMLReader::open() and XMLReader::xml() are now static
Christoph M. Becker [Sun, 11 Oct 2020 16:50:35 +0000 (18:50 +0200)]
XMLReader::open() and XMLReader::xml() are now static
Christoph M. Becker [Sun, 11 Oct 2020 16:23:26 +0000 (18:23 +0200)]
Merge branch 'PHP-8.0' into master
* PHP-8.0:
Remove return types from XMLWriter stubs
Christoph M. Becker [Sun, 11 Oct 2020 14:36:19 +0000 (16:36 +0200)]
Remove return types from XMLWriter stubs
These break BC, and as such we have to stick with docblock annotations.
Closes GH-6319.
Derick Rethans [Sun, 11 Oct 2020 13:54:18 +0000 (14:54 +0100)]
Merge branch 'PHP-8.0' into master
Derick Rethans [Sun, 11 Oct 2020 13:54:12 +0000 (14:54 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0
Derick Rethans [Sun, 11 Oct 2020 13:54:02 +0000 (14:54 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4
Derick Rethans [Sun, 11 Oct 2020 13:53:52 +0000 (14:53 +0100)]
Fixed test for bug #48097 due to confirmed data changes in timelib
Christoph M. Becker [Sat, 10 Oct 2020 21:29:11 +0000 (23:29 +0200)]
Merge branch 'PHP-8.0' into master
* PHP-8.0:
Fix #80215: imap_mail_compose() may modify by-val parameters
Christoph M. Becker [Sat, 10 Oct 2020 21:28:04 +0000 (23:28 +0200)]
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
Fix #80215: imap_mail_compose() may modify by-val parameters
Christoph M. Becker [Sat, 10 Oct 2020 21:25:43 +0000 (23:25 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix #80215: imap_mail_compose() may modify by-val parameters
Christoph M. Becker [Sat, 10 Oct 2020 15:16:41 +0000 (17:16 +0200)]
Fix #80215: imap_mail_compose() may modify by-val parameters
We separate the input arrays and all sub-arrays to avoid modification
of the passed parameters.
This should be rewritten to use `zend_string`s for the "master" branch.
Closes GH-6316.
Christoph M. Becker [Sat, 10 Oct 2020 17:20:13 +0000 (19:20 +0200)]
Merge branch 'PHP-8.0' into master
* PHP-8.0:
Fix #80213: imap_mail_compose() segfaults on certain $bodies
Christoph M. Becker [Sat, 10 Oct 2020 17:19:33 +0000 (19:19 +0200)]
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
Fix #80213: imap_mail_compose() segfaults on certain $bodies
Christoph M. Becker [Sat, 10 Oct 2020 17:17:59 +0000 (19:17 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix #80213: imap_mail_compose() segfaults on certain $bodies
Christoph M. Becker [Sat, 10 Oct 2020 12:09:07 +0000 (14:09 +0200)]
Fix #80213: imap_mail_compose() segfaults on certain $bodies
We have to cater to non-associative arrays where the key may be `NULL`;
we just skip these elements.
Closes GH-6315.
George Peter Banyard [Tue, 14 Apr 2020 20:32:10 +0000 (22:32 +0200)]
Add compiler flags which aren't included in -Wall or -Wextra
Adds the following compiler flags:
. -Wduplicated-cond
. -Wlogical-op
. -Wformat-truncation
. -fno-common
Closes GH-6199
George Peter Banyard [Sat, 10 Oct 2020 13:56:52 +0000 (14:56 +0100)]
Add -Wno-logical-op compiler flag to Sodium extension
Christoph M. Becker [Sat, 10 Oct 2020 15:47:19 +0000 (17:47 +0200)]
Merge branch 'PHP-8.0' into master
* PHP-8.0:
Fix #80175: PHP8 RC1 - JIT Buffer not working
Christoph M. Becker [Sat, 3 Oct 2020 15:02:24 +0000 (17:02 +0200)]
Fix #80175: PHP8 RC1 - JIT Buffer not working
On Windows, `SUCCESSFULLY_REATTACHED` does not imply that the process
has already been properly initialized; thus we must not skip some setup
steps in `zend_jit_startup()`.
Closes GH-6268.
Christoph M. Becker [Sat, 10 Oct 2020 15:40:26 +0000 (17:40 +0200)]
Merge branch 'PHP-8.0' into master
* PHP-8.0:
Change imap_mail_compose() $body param to $bodies
Christoph M. Becker [Sat, 10 Oct 2020 11:49:41 +0000 (13:49 +0200)]
Change imap_mail_compose() $body param to $bodies
This parameter actually expects an array of bodies, so we should name
it accordingly.
Closes GH-6313.
George Peter Banyard [Wed, 23 Sep 2020 22:46:58 +0000 (23:46 +0100)]
Suppress bogus [-Wlogical-op] warning from GCC
See GCC bug 69602: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69602
which emits the warning for (errno == EWOULDBLOCK || errno == EAGAIN)
which is the correct way of handling errors as the value of EWOULDBLOCK
and EAGAIN is implementation defined.
Therefore introduce a new macro function PHP_IS_TRANSIENT_ERROR()
which handles the case when EWOULDBLOCK and EAGAIN are identical.
Thanks to @twose for the idea.
George Peter Banyard [Thu, 24 Sep 2020 00:54:26 +0000 (01:54 +0100)]
Fix [-Wlogical-op] in IMAP
Nikita Popov [Sat, 10 Oct 2020 09:09:00 +0000 (11:09 +0200)]
Merge branch 'PHP-8.0'
* PHP-8.0:
Don't specify symfony branch
Nikita Popov [Sat, 10 Oct 2020 09:08:47 +0000 (11:08 +0200)]
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
Don't specify symfony branch
Nikita Popov [Sat, 10 Oct 2020 09:07:49 +0000 (11:07 +0200)]
Don't specify symfony branch
This was renamed from master to 5.x. Just use the default branch.
George Peter Banyard [Wed, 30 Sep 2020 13:34:10 +0000 (14:34 +0100)]
Fix [-Wduplicated-branches] in CLI SAPI
George Peter Banyard [Wed, 23 Sep 2020 23:12:08 +0000 (00:12 +0100)]
Fix [-Wduplicated-cond] in MySQLnd driver
Changing it to TYPE_C as this is the only other type in the mysqlnd_buffered_type enum
George Peter Banyard [Wed, 23 Sep 2020 22:58:11 +0000 (23:58 +0100)]
Fix [-Wduplicated-cond] in MBString extension
Dmitry Stogov [Fri, 9 Oct 2020 15:58:25 +0000 (18:58 +0300)]
Merge branch 'PHP-8.0'
* PHP-8.0:
Eliminate dead load
Dmitry Stogov [Fri, 9 Oct 2020 15:58:03 +0000 (18:58 +0300)]
Eliminate dead load
Nikita Popov [Fri, 9 Oct 2020 15:10:30 +0000 (17:10 +0200)]
Merge branch 'PHP-8.0'
* PHP-8.0:
Update ext/gd parameter names
Nikita Popov [Fri, 9 Oct 2020 10:28:54 +0000 (12:28 +0200)]
Update ext/gd parameter names
Closes GH-6308.
Nikita Popov [Fri, 9 Oct 2020 15:02:40 +0000 (17:02 +0200)]
Merge branch 'PHP-8.0'
* PHP-8.0:
Fixed bug #80186
Nikita Popov [Fri, 9 Oct 2020 14:59:01 +0000 (16:59 +0200)]
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
Fixed bug #80186
Nikita Popov [Fri, 9 Oct 2020 14:56:08 +0000 (16:56 +0200)]
Fixed bug #80186
Early exit in FE_RESET if get_properties() returns empty array,
as we cannot add HT iterators to zend_empty_array.
Nikita Popov [Fri, 9 Oct 2020 14:22:55 +0000 (16:22 +0200)]
Merge branch 'PHP-8.0'
* PHP-8.0:
Update to mime-db 1.45
Nikita Popov [Fri, 9 Oct 2020 14:22:04 +0000 (16:22 +0200)]
Update to mime-db 1.45
Nikita Popov [Fri, 9 Oct 2020 14:12:44 +0000 (16:12 +0200)]
Merge branch 'PHP-8.0'
* PHP-8.0:
Remove string length limit from levenshtein()
Nikita Popov [Tue, 6 Oct 2020 15:12:41 +0000 (17:12 +0200)]
Remove string length limit from levenshtein()
As noted on https://bugs.php.net/bug.php?id=80073, I don't think
having this limitation makes sense. The similar_text() function
has much worse asymptotic complexity than levenshtein() and does
not enforce such a limitation. levenshtein() does have fairly high
memory requirements, but they are a fixed factor of the string
length (and subject to memory limit).
Nikita Popov [Fri, 9 Oct 2020 14:10:26 +0000 (16:10 +0200)]
Merge branch 'PHP-8.0'
* PHP-8.0:
Add support for Solaris 11.4 openpty implementation.
Petr Sumbera [Tue, 6 Oct 2020 15:25:00 +0000 (17:25 +0200)]
Add support for Solaris 11.4 openpty implementation.
Closes GH-6287.
Dmitry Stogov [Fri, 9 Oct 2020 14:00:43 +0000 (17:00 +0300)]
Merge branch 'PHP-8.0'
* PHP-8.0:
Keep the same JIT code for PHP-8.0 and master (workaround against PHP-8.0 ABI freeze)
Nikita Popov [Fri, 9 Oct 2020 13:56:44 +0000 (15:56 +0200)]
Add scheduled builds to yaml pipeline
Not sure if this is going to work, as the UI configured scheduled
builds are supposed to take precedence ... but I have no idea
how to access them.
Dmitry Stogov [Fri, 9 Oct 2020 13:54:26 +0000 (16:54 +0300)]
Keep the same JIT code for PHP-8.0 and master (workaround against PHP-8.0 ABI freeze)
Nikita Popov [Fri, 9 Oct 2020 13:31:02 +0000 (15:31 +0200)]
Merge branch 'PHP-8.0'
* PHP-8.0:
Enable Azure pipeline builds on PHP-8.0
Nikita Popov [Fri, 9 Oct 2020 13:30:40 +0000 (15:30 +0200)]
Enable Azure pipeline builds on PHP-8.0
Nikita Popov [Fri, 9 Oct 2020 13:25:31 +0000 (15:25 +0200)]
Merge branch 'PHP-8.0'
* PHP-8.0:
Make iconv errno support test pass on Solaris.