1
0
mirror of https://github.com/php/php-src.git synced 2026-04-27 10:16:41 +02:00
Commit Graph

121277 Commits

Author SHA1 Message Date
Alex Dowad f474e5502c Refactor UTF-16LE -> wchar conversion code 2020-10-13 06:12:37 +02:00
Alex Dowad 3f1851dec2 Avoid compiler warnings related to mbstring flush functions 2020-10-13 06:12:37 +02:00
Christoph M. Becker d523de69d7 Merge branch 'PHP-8.0' into master
* PHP-8.0:
  Fix #80226: imap_sort() leaks sortpgm memory
2020-10-12 23:22:19 +02:00
Christoph M. Becker 818eb8f611 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix #80226: imap_sort() leaks sortpgm memory
2020-10-12 23:21:56 +02:00
Dmitry Stogov 9c3c67b1bf Merge branch 'PHP-8.0'
* PHP-8.0:
  Perform trace range propagation
2020-10-13 00:19:02 +03:00
Dmitry Stogov 87beb22ff8 Perform trace range propagation 2020-10-13 00:18:17 +03:00
Christoph M. Becker 12fc8f66e7 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #80226: imap_sort() leaks sortpgm memory
2020-10-12 23:17:57 +02:00
Christoph M. Becker 8488c34fc6 Fix #80226: imap_sort() leaks sortpgm memory
We need to free what we have allocated.

Closes GH-6327.
2020-10-12 23:16:31 +02:00
Christoph M. Becker 51cb9b8373 Merge branch 'PHP-8.0' into master
* PHP-8.0:
  Change parameters types from int to bool
2020-10-12 23:10:41 +02:00
Christoph M. Becker 8d4774a2df 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.
2020-10-12 23:10:13 +02:00
Dmitry Stogov 1fe1a58268 Merge branch 'PHP-8.0'
* PHP-8.0:
  Eliminate dead stores
2020-10-12 22:59:48 +03:00
Dmitry Stogov 1c596ff146 Eliminate dead stores 2020-10-12 22:59:30 +03:00
Máté Kocsis 270def3d91 Merge branch 'PHP-8.0' 2020-10-12 18:09:08 +02:00
Máté Kocsis 186612e4d7 Improve parameter names in ext/intl
Closes GH-6309
2020-10-12 18:06:45 +02:00
Máté Kocsis eef994d621 Improve parameter names in ext/pdo_sqlite
Closes GH-6310
2020-10-12 18:05:35 +02:00
Nikita Popov 656c37abe2 Merge branch 'PHP-8.0'
* PHP-8.0:
  intl: report more information about message pattern parse errors
2020-10-12 16:44:46 +02:00
Nikita Popov 6edad1716d Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  intl: report more information about message pattern parse errors
2020-10-12 16:44:18 +02:00
Philip Hofstetter 74cf2eb83f 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.
2020-10-12 16:42:41 +02:00
Nikita Popov c0b4dea858 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fixed bug #80225
2020-10-12 16:35:20 +02:00
Nikita Popov f9b7609d17 Fixed bug #80225
Namespaced and declares have a different interpretation of what
"first statement" means.
2020-10-12 16:35:09 +02:00
Christoph M. Becker 8e4022b461 Merge branch 'PHP-8.0' into master
* PHP-8.0:
  Fix #80216: imap_mail_compose() does not validate types/encodings
2020-10-12 16:31:03 +02:00
Christoph M. Becker 11c752a5f5 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix #80216: imap_mail_compose() does not validate types/encodings
2020-10-12 16:30:48 +02:00
Christoph M. Becker 216d6a024a Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #80216: imap_mail_compose() does not validate types/encodings
2020-10-12 16:28:52 +02:00
Christoph M. Becker 73e43b6e19 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.
2020-10-12 16:27:49 +02:00
Christoph M. Becker 2e17c937bf Merge branch 'PHP-8.0' into master
* PHP-8.0:
  Fix #80223: imap_mail_compose() leaks envelope on malformed bodies
2020-10-12 15:10:55 +02:00
Christoph M. Becker 0443c824a3 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix #80223: imap_mail_compose() leaks envelope on malformed bodies
2020-10-12 15:10:38 +02:00
Christoph M. Becker 4a469c7e98 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #80223: imap_mail_compose() leaks envelope on malformed bodies
2020-10-12 15:09:30 +02:00
Christoph M. Becker c1962e900a Fix #80223: imap_mail_compose() leaks envelope on malformed bodies
We have to clean up even on failure.

Closes GH-6322.
2020-10-12 15:08:30 +02:00
Christoph M. Becker c3365bb301 Merge branch 'PHP-8.0' into master
* PHP-8.0:
  Fix #80220: imap_mail_compose() may leak memory
2020-10-12 13:34:42 +02:00
Christoph M. Becker 5a8958f0f3 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix #80220: imap_mail_compose() may leak memory
2020-10-12 13:34:19 +02:00
Christoph M. Becker acce991a37 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #80220: imap_mail_compose() may leak memory
2020-10-12 13:32:40 +02:00
Christoph M. Becker 0d022ddf03 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.
2020-10-12 13:31:30 +02:00
Nikita Popov e735de6eae 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.
2020-10-12 13:00:41 +02:00
Nikita Popov d731b764e5 Merge branch 'PHP-8.0'
* PHP-8.0:
  Revert "Add missing X509 purpose constants"
2020-10-12 12:56:30 +02:00
Nikita Popov 2cd2ca8884 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Revert "Add missing X509 purpose constants"
2020-10-12 12:56:21 +02:00
Nikita Popov 41e4a77077 Revert "Add missing X509 purpose constants"
This reverts commit 1e53e14bc3.

This fails on Travis.
2020-10-12 12:56:07 +02:00
Nikita Popov 649505e751 Merge branch 'PHP-8.0'
* PHP-8.0:
  Add missing X509 purpose constants
2020-10-12 11:53:59 +02:00
Nikita Popov da60849fa1 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Add missing X509 purpose constants
2020-10-12 11:53:22 +02:00
Vincent JARDIN 1e53e14bc3 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.
2020-10-12 11:51:08 +02:00
Nikita Popov 14830ab2a3 Merge branch 'PHP-8.0'
* PHP-8.0:
  Detect self-addition of array more accurately
  Deindirect source elements in zend_hash_merge
2020-10-12 11:25:36 +02:00
Nikita Popov 66ecee6243 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
2020-10-12 11:25:27 +02:00
Nikita Popov 5a7f9afb99 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
2020-10-12 11:24:59 +02:00
Nikita Popov 3c4dd73c02 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.
2020-10-12 11:24:31 +02:00
Nikita Popov e304468e57 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.
2020-10-12 11:24:27 +02:00
Nikita Popov ed3f197f9f Merge branch 'PHP-8.0'
* PHP-8.0:
  Backport schedule in yaml
2020-10-12 10:07:01 +02:00
Nikita Popov 8d11576a86 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Backport schedule in yaml
2020-10-12 10:06:40 +02:00
Nikita Popov 9a2e5cfccb 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.
2020-10-12 10:05:37 +02:00
Nikita Popov 57721d6172 Merge branch 'PHP-8.0'
* PHP-8.0:
  Avoid non-object in FE_FREE
2020-10-12 09:47:22 +02:00
Nikita Popov d953cd1862 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Avoid non-object in FE_FREE
2020-10-12 09:46:38 +02:00
Nikita Popov 304141e8f8 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.
2020-10-12 09:45:52 +02:00