1
0
mirror of https://github.com/php/php-src.git synced 2026-04-25 00:48:25 +02:00
Commit Graph

127916 Commits

Author SHA1 Message Date
George Peter Banyard 62ab9293ae Fix [-Wundef] warnings in SNMP extension 2022-04-01 15:45:44 +01:00
George Peter Banyard 2c2ecba063 Determine value of ZEND_MM_* during config and fix sign conversion (#6981)
Also add a new ZEND_MM_NEED_EIGHT_BYTE_REALIGNMENT definition.

This fixes many [-Wsign-conversion] warnings.

Co-authored-by: Guillaume Charifi <guillaume.charifi@sfr.fr>
Co-authored-by: Bob Weinand <bobwei9@hotmail.com>
2022-04-01 15:43:42 +01:00
George Peter Banyard 738adce79f Fix [-Wundef] warnings in DBA extension 2022-04-01 14:38:44 +01:00
Derick Rethans cd6c338c89 Merge branch 'PHP-8.1' 2022-04-01 13:28:13 +01:00
Derick Rethans e6c4988187 Fixed #7752, #8101, #81660: DateTimeZone::getTransitions() returns insufficient data 2022-04-01 13:28:05 +01:00
Ilija Tovilo c7875a68ee Merge branch 'PHP-8.1'
* PHP-8.1:
  Re-enable i386 tests on Azure Pipelines
2022-04-01 13:37:30 +02:00
Ilija Tovilo 7d6a3af7db Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Re-enable i386 tests on Azure Pipelines
2022-04-01 13:37:07 +02:00
Ilija Tovilo d82d62c237 Re-enable i386 tests on Azure Pipelines 2022-04-01 12:55:31 +02:00
Patrick Allaert 2aceb0b00e Merge branch 'PHP-8.1' 2022-03-31 17:38:09 +02:00
Patrick Allaert 5a899563cc Bump for 8.1.6-dev 2022-03-31 17:37:41 +02:00
Max Kellermann b9e895bca0 Replace memcmp() with zend_string functions (#8216)
* ext/oci8: use zend_string_equals()

Eliminate duplicate code.

* main/php_variables: use zend_string_equals_literal()

Eliminate duplicate code.

* Zend/zend_string: add zend_string_equals_cstr()

Allows eliminating duplicate code.

* Zend, ext/{opcache,standard}, main/output: use zend_string_equals_cstr()

Eliminate duplicate code.

* Zend/zend_string: add zend_string_starts_with()

* ext/{opcache,phar,spl,standard}: use zend_string_starts_with()

This adds missing length checks to several callers, e.g. in
cache_script_in_shared_memory().  This is important when the
zend_string is shorter than the string parameter, when memcmp()
happens to check backwards; this can result in an out-of-bounds memory
access.
2022-03-31 16:27:58 +02:00
Ilija Tovilo 54440fa6eb Merge branch 'PHP-8.1'
* PHP-8.1:
  Register JSON_ERROR_NON_BACKED_ENUM constant (#8285)
2022-03-31 14:31:43 +02:00
Ilija Tovilo 2145f80d4b Register JSON_ERROR_NON_BACKED_ENUM constant (#8285)
Fixes GH-8238
2022-03-31 14:31:17 +02:00
Kamil Tekiela 15129ab688 Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix mnd_malloc -> mnd_emalloc from previous merge
2022-03-31 10:54:38 +01:00
Kamil Tekiela ced5581eca Fix mnd_malloc -> mnd_emalloc from previous merge 2022-03-31 10:53:58 +01:00
Kamil Tekiela 6a4618f7c2 Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix regression from #8058
2022-03-31 10:33:56 +01:00
Kamil Tekiela 40b20d8215 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix regression from #8058
2022-03-31 10:32:59 +01:00
Kamil Tekiela 06e383b2f4 Fix regression from #8058
Closes GH-8181
2022-03-31 10:31:52 +01:00
Zhou Qingyang 48e0707620 spl_ptr_llist_offset() is not supposed to return NULL here
This issue has found by a static analyzer.

Closes GH-8272.
2022-03-30 11:38:25 +02:00
Christoph M. Becker c9c5ee3f48 Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix GH-8253: pg_insert() fails for references
2022-03-29 10:54:32 +02:00
Christoph M. Becker 7e8dcda42c Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix GH-8253: pg_insert() fails for references
2022-03-29 10:53:56 +02:00
Christoph M. Becker 0e6d6f83cc Fix GH-8253: pg_insert() fails for references
We need to deref the values.

Closes GH-8262.
2022-03-29 10:51:19 +02:00
Remi Collet a6d88d3b26 Merge branch 'PHP-8.1'
* PHP-8.1:
  typo
2022-03-29 10:20:53 +02:00
Remi Collet 43dd512eb6 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  typo
2022-03-29 10:20:34 +02:00
Remi Collet fe4aba6588 typo 2022-03-29 10:20:21 +02:00
Remi Collet d376630811 Merge branch 'PHP-8.1'
* PHP-8.1:
  run-tests.php: fix TypeError: Unsupported operand types: string * int <n> is mandatory for --show-slow and --set-timeout use <n> in help message instead of confusing [n]
2022-03-29 09:55:22 +02:00
Remi Collet 85533e741a Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  run-tests.php: fix TypeError: Unsupported operand types: string * int <n> is mandatory for --show-slow and --set-timeout use <n> in help message instead of confusing [n]
2022-03-29 09:55:04 +02:00
Remi Collet 23cce68d24 run-tests.php: fix TypeError: Unsupported operand types: string * int <n> is mandatory for --show-slow and --set-timeout use <n> in help message instead of confusing [n] 2022-03-29 09:54:40 +02:00
Stanislav Malyshev 8200d667fb Merge branch 'PHP-8.1'
* PHP-8.1:
  Don't try to access memory outside string
2022-03-28 10:54:49 -06:00
Stanislav Malyshev 187a0e4707 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Don't try to access memory outside string
2022-03-28 10:54:05 -06:00
Stanislav Malyshev 2119ba215a Don't try to access memory outside string 2022-03-28 10:52:34 -06:00
Christoph M. Becker 072b09fd35 Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix result_type related stack corruption on LLP64 architectures
2022-03-28 18:30:05 +02:00
Christoph M. Becker 5f20f9f72d Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix result_type related stack corruption on LLP64 architectures
2022-03-28 18:29:38 +02:00
Christoph M. Becker 5a8622fe78 Fix result_type related stack corruption on LLP64 architectures
Integer parameters are stored in `zend_long` values, which have 64 bits
on LLP64, but `long` has only 32 bits there.

Adding a test might be overkill, because the broken behavior could
already be observed when running pg_select_001.phpt on Windows debug
builds, which report the stack corruption.

Closes GH-8263.
2022-03-28 18:27:44 +02:00
Christoph M. Becker 064dd48046 Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix signedness confusion in php_filter_validate_domain()
2022-03-28 14:04:34 +02:00
Christoph M. Becker 1c3374c785 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix signedness confusion in php_filter_validate_domain()
2022-03-28 14:02:32 +02:00
Christoph M. Becker 771dbdb319 Fix signedness confusion in php_filter_validate_domain()
As is, there is the possibility that integer underflow occurs, making
`_php_filter_validate_domain()` succeed for very long domain names.

Cf. <https://pwning.systems/posts/php_filter_var_shenanigans/>.
2022-03-28 14:00:22 +02:00
Martin Kealey 2fc1ddc0f1 line break before --prefix in php-fpm man page 2022-03-27 17:44:31 +02:00
Dmitry Stogov 2d3415a74a Merge branch 'PHP-8.1'
* PHP-8.1:
  JIT: Fixed memory leak
2022-03-25 16:56:08 +03:00
Dmitry Stogov 7aac1c11ee Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  JIT: Fixed memory leak
2022-03-25 16:55:37 +03:00
Dmitry Stogov aa352c2c54 JIT: Fixed memory leak
Fixes oss-fuzz #45981
2022-03-25 16:54:50 +03:00
Ilija Tovilo 20fe5e4162 Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix IntlPartsIterator key off-by-one error
2022-03-25 13:13:26 +01:00
Ilija Tovilo e706d024b2 Fix IntlPartsIterator key off-by-one error
Closes GH-7734
Closes GH-8172
2022-03-25 13:10:55 +01:00
Max Kellermann 04a4864b65 ext/opcache: merge redundant code and "bool" refactoring (#8237)
* ext/opcache/ZendAccelerator: make check_persistent_script_access() static

* ext/opcache/ZendAccelerator: convert "int" to "bool"

* ext/opcache/zend_file_cache: convert "int" to "bool"

* ext/opcache: use true/false for zend_persistent_script.corrupted

* ext/opcache/ZendAccelerator: move duplicate code to zend_accel_discard_script()

* ext/opcache/ZendAccelerator: convert accel_deactivate_now() to function

Simplify the #iddef ZEND_WIN32.

* ext/opcache/zend_file_cache: simplify iovec initializer

* ext/opcache/zend_file_cache: add local zend_string* variables

Eliminates lots of redundant casts and avoids reloading the variable
from RAM into registers.

* ext/opcache/zend_file_cache: use ZSTR_VAL()

* ext/opcache/zend_file_cache: move code to zend_file_cache_script_write()

This eliminates duplicate error handling code.
2022-03-24 15:03:53 +01:00
David CARLIER 814374faa1 fpm zlog_stream_buf_alloc_ex little simplifications. (#8224) 2022-03-24 00:13:51 +00:00
George Peter Banyard e948d3c9c8 Use zend_string_to(upper|lower)() API directly 2022-03-23 23:59:41 +00:00
George Peter Banyard 71a110fcaa Remove strnatcmp_ex() wrappers
These APIs always returned SUCCESS.

Closes GH-8195
2022-03-23 23:53:12 +00:00
George Peter Banyard db0db2204f Use zend_result/bool in spl_array.c 2022-03-23 22:21:04 +00:00
George Peter Banyard 2fa33d1def Use ZEND_THROWS() where applicable in spl_array.c 2022-03-23 22:13:08 +00:00
George Peter Banyard 69ea2d8600 Convert check + exception to assertion
Move the inside the __unserialize() method as that's the only one which now needs this check

Closes GH-8207
2022-03-23 22:02:27 +00:00