1
0
mirror of https://github.com/php/php-src.git synced 2026-04-21 15:08:16 +02:00
Commit Graph

58439 Commits

Author SHA1 Message Date
Dmitry Stogov c8a8c47f7e Merge branch 'PHP-8.0'
* PHP-8.0:
  Additional fix for bug #80847. On x86_64 part of structure may be passed in CPU registers.
2021-03-18 16:16:29 +03:00
Dmitry Stogov 465cfc499b Additional fix for bug #80847.
On x86_64 part of structure may be passed in CPU registers.
2021-03-18 16:13:42 +03:00
Dmitry Stogov 9373d159c2 "zend-test" was renamed to "zend_test" 2021-03-18 14:36:46 +03:00
Nikita Popov 3b88e65265 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix locale switch back to C in pcre
2021-03-18 10:51:04 +01:00
Nikita Popov 4dce2f83f5 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix locale switch back to C in pcre
2021-03-18 10:50:57 +01:00
Nikita Popov 4be867e910 Fix locale switch back to C in pcre
The compile context is shared between patterns, so we need to set
the character tables unconditionally in case we switched from
a non-C locale to the C locale.
2021-03-18 10:48:43 +01:00
Dharman 7e9f6d2a48 Deprecate OO style mysqli::get_client_info method
Deprecate passing connection object to mysqli_get_client_info()

Closes GH-6777.
2021-03-17 20:10:18 +00:00
Dmitry Stogov eb8f5e4347 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fixed bug #80861 (erronous array key overflow in 2D array with JIT)
2021-03-17 23:00:22 +03:00
Dmitry Stogov 7e494d9225 Fixed bug #80861 (erronous array key overflow in 2D array with JIT) 2021-03-17 22:59:59 +03:00
Ilija Tovilo 269c8dac1d Implement enums
RFC: https://wiki.php.net/rfc/enumerations

Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>

Closes GH-6489.
2021-03-17 19:08:03 +01:00
George Peter Banyard a6fc427b8c Use zend_string_equals() API instead of strcmp() in various places
Closes GH-6784
2021-03-17 16:36:23 +00:00
George Peter Banyard a74e248c43 Use zend_string_equals() API instead of strcmp() in COM extension 2021-03-17 16:36:16 +00:00
George Peter Banyard 6acb079906 Use zend_string_equals() API instead of strcmp() in Date extension 2021-03-17 16:36:16 +00:00
George Peter Banyard 4b20c03387 Use zend_string_equals() API instead of strcmp() in Filter extension 2021-03-17 16:36:16 +00:00
George Peter Banyard 48ac3881a3 Use zend_string_equals() API instead of strcmp() in PGSQL extension
And tiny drive by refactor at the same time for more usages
2021-03-17 16:36:16 +00:00
George Peter Banyard 84e12626e7 Use zend_string_equals() API instead of strcmp() in SOAP extension 2021-03-17 16:36:16 +00:00
Nikita Popov 34e39ebaf5 Fix signed/unsigned warnings in PDO ODBC
Add add skipif to test.

(cherry picked from commit aa58db7232)
2021-03-17 16:33:32 +01:00
Nikita Popov e9d78339e7 Use absolute paths in tokenizer_data_gen.php
To make it work with out-of-tree builds.
2021-03-17 15:54:02 +01:00
Christoph M. Becker 128082c86f Initalize return_value before use
Otherwise we likely segfault[1].  We fix the same issue for
PDO_Firebird as well.

[1] <https://ci.appveyor.com/project/php/php-src/builds/38267250/job/6y3ngn1k6ryxx6j3?fullLog=true#L9783>

Closes GH-6785.
2021-03-17 15:39:50 +01:00
Nikita Popov 92a969421c Merge branch 'PHP-8.0'
* PHP-8.0:
  imagecolortransparent() cannot return null
2021-03-17 15:09:26 +01:00
Nikita Popov d80118dc16 imagecolortransparent() cannot return null 2021-03-17 15:09:06 +01:00
Nikita Popov db538775e1 Merge branch 'PHP-8.0'
* PHP-8.0:
  Return bool from imageinterlace()
2021-03-17 15:06:46 +01:00
Nikita Popov c17434429d Return bool from imageinterlace()
The function accepts a bool since PHP 8.0, so it should also return
a bool to keep things consistent.

Furthermore a null return from this functions is not possible.
2021-03-17 15:05:09 +01:00
Dmitry Stogov 8f0ca7c16c Merge branch 'PHP-8.0'
* PHP-8.0:
  Fixed bug #80839 (PHP problem with JIT)
2021-03-17 16:55:42 +03:00
Dmitry Stogov faf1567212 Fixed bug #80839 (PHP problem with JIT) 2021-03-17 16:55:09 +03:00
Christoph M. Becker e65f705ce3 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix #66783: UAF when appending DOMDocument to element
2021-03-17 12:40:40 +01:00
Christoph M. Becker fddd0ac552 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix #66783: UAF when appending DOMDocument to element
2021-03-17 12:40:03 +01:00
Christoph M. Becker a08847ab39 Fix #66783: UAF when appending DOMDocument to element
According to the DOM standard, elements may only contain element, text,
processing instruction and comment nodes[1].  It is also specified that
a HierarchyRequestError should be thrown if a document is to be
inserted[2].  We follow that standard, and prevent the use-after-free
this way.

[1] <https://dom.spec.whatwg.org/#node-trees>
[2] <https://dom.spec.whatwg.org/#mutation-algorithms>

Closes GH-6765.
2021-03-17 12:37:18 +01:00
Nikita Popov 709e45d89b Avoid unnecessary static_variables persistence
static_variables should be treated the same way as all other
op_array components nowadays (only static_variables_ptr is
special). There's no need to persist/serialize it is separately
per shared op_array.
2021-03-17 12:20:58 +01:00
Nikita Popov 4cff8c10a9 Simplify attribute persistence
For an inherited op_array, directly fetch the xlat entry, as we
do for everything else.
2021-03-17 11:52:45 +01:00
Nikita Popov 69018da09b Fix PDO test under libmysqlclient 2021-03-17 11:26:41 +01:00
Máté Kocsis f15d52796e Declare PDORow::queryString property
Relates GH-6742
2021-03-17 09:42:35 +01:00
Dmitry Stogov 1494e87bd0 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fixed bug #80847 (CData structs with fields of type struct can't be passed as C function argument)
2021-03-17 09:56:07 +03:00
Dmitry Stogov 38ebb55c7c Fixed bug #80847 (CData structs with fields of type struct can't be passed as C function argument) 2021-03-17 09:55:20 +03:00
George Peter Banyard ebaeb93c3f Add API to fetch bool value for PDO attribute values
Closes GH-6766
2021-03-17 00:58:01 +00:00
George Peter Banyard c465462e91 Use standard PDO way for fetching integer attribute values 2021-03-17 00:58:01 +00:00
George Peter Banyard 32fb9b6fd1 Validate string is numeric for integer PDO attribute value 2021-03-17 00:58:00 +00:00
Máté Kocsis e0aab7413b Promote DOM invalid state errors during property access
Closes GH-6780
2021-03-16 20:22:32 +01:00
Dmitry Stogov c732ab400a Change Zend Stream API to use zend_string* instead of char*.
This allows to eliminate re-calculation of string lenght and hash value.
See the detailed list of changes in UPGRADING.INTERNALS.
2021-03-16 20:31:36 +03:00
Ilija Tovilo 9bbeb0555b Add tokenizer_data_gen to build process
Closes GH-6723.
2021-03-16 14:53:59 +01:00
Nikita Popov 4f750f7171 Revert "Remove some unnecessary explicit header dependencies"
This reverts commit c386b1fb17.

It looks like at least some of these might be needed for ordering
in a clean build?
2021-03-16 14:22:25 +01:00
Nikita Popov c386b1fb17 Remove some unnecessary explicit header dependencies
These are now automatically tracked by the build system.
2021-03-16 13:02:23 +01:00
Nikita Popov 82622d7583 Fix refcount inference for typed properties
We were not adding RC1/RCN if the MAY_BE_OBJECT came from a class
type and there was no other refcounted type in the union.
2021-03-16 11:17:18 +01:00
Máté Kocsis 66f16f4eb2 Merge branch 'PHP-8.0'
* Fix crash in LDAP search functions during argument validation
* Fix ldap_next_entry() parameter name
2021-03-16 09:34:41 +01:00
Máté Kocsis 465aa1d38f Fix ldap_next_entry() parameter name 2021-03-16 09:31:46 +01:00
Máté Kocsis b03438ba3a Fix crash in LDAP search functions during argument validation 2021-03-16 09:31:37 +01:00
Máté Kocsis 87b263d2d7 Merge branch 'PHP-8.0' 2021-03-15 23:47:58 +01:00
Máté Kocsis 5ecc078a17 Add missing skipif sections to ext/dom tests 2021-03-15 23:45:37 +01:00
Christoph M. Becker 0b2bb98af9 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix #80817: dba_popen() may cause segfault during RSHUTDOWN
2021-03-15 18:40:30 +01:00
Christoph M. Becker eae69fcf71 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix #80817: dba_popen() may cause segfault during RSHUTDOWN
2021-03-15 18:39:26 +01:00