1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Commit Graph

65655 Commits

Author SHA1 Message Date
Máté Kocsis
1663ed6c6e Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Add missing return for DatePeriod::__unserialize
2024-09-03 21:31:00 +02:00
Máté Kocsis
6cab76986d Add missing return for DatePeriod::__unserialize
Additionally, add other RETURN_THROWS() defensively.
2024-09-03 21:27:50 +02:00
Dmitry Stogov
be8589651d Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-15652: Segmentation fault in the Zend engine when JIT enabled (#15717)
2024-09-02 21:55:40 +03:00
Dmitry Stogov
1e78cf941c Fix GH-15652: Segmentation fault in the Zend engine when JIT enabled (#15717) 2024-09-02 21:55:19 +03:00
Christoph M. Becker
a51f54b54b Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-15552: Signed integer overflow in ext/standard/scanf.c
2024-09-01 17:25:18 +02:00
Christoph M. Becker
08841bf79c Fix GH-15552: Signed integer overflow in ext/standard/scanf.c
We ensure that the argnum `value` is in the allowed range, *before*
mapping it to the `objIndex`, not *afterwards*.

Closes GH-15581.
2024-09-01 17:24:17 +02:00
Christoph M. Becker
ac4039df20 Mark gd14930.phpt as dynamic xfail
This test only fails when `NAME_MAX` is defined, which is never the
case on Windows, so we let the test pass there.  This could be extended
to other environments where `NAME_MAX` is not defined.
2024-09-01 15:04:54 +02:00
Niels Dossche
9cb23a3dec Fix GH-15654: Signed integer overflow in ext/dom/nodelist.c
There's implicit truncation casts from zend_long to int which cause
issues because checks are done against the zend_longs. Since the
iterator infrastructure uses zend_longs, just convert everything to
zend_long.

Closes GH-15669.
2024-08-31 11:47:08 +02:00
Go Kudo
bf9929a26c standard: supress msan (#15665) 2024-08-31 15:56:11 +09:00
David Carlier
d7d40b4c80 Merge branch 'PHP-8.2' into PHP-8.3 2024-08-30 17:17:20 +01:00
David Carlier
7db1a5843f Fix GH-15653: fgetcsv overflow on length parameter.
close GH-15655
2024-08-30 17:16:57 +01:00
Dmitry Stogov
b55816e9d1 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Don't set IS_STR_PERMANENT flag for strings stored in the file cache (#15643)
2024-08-30 01:01:22 +03:00
Dmitry Stogov
afba2010c0 Don't set IS_STR_PERMANENT flag for strings stored in the file cache (#15643) 2024-08-30 00:59:06 +03:00
Dmitry Stogov
bf98023f1a Prevent possible incorrect optimization caused by ZEND_ASSUME() 2024-08-29 23:10:34 +03:00
Dmitry Stogov
c15bb9afe2 Restore error message incorrectly removed by commit 10d43c4 (related to GH-15497) 2024-08-29 16:59:14 +03:00
Dmitry Stogov
17e313ee62 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-15497: Opcache with file_cache and JIT enabled crashes (#15635)
2024-08-29 16:46:56 +03:00
Dmitry Stogov
fd42cdbd0a Fix GH-15497: Opcache with file_cache and JIT enabled crashes (#15635) 2024-08-29 16:46:49 +03:00
Peter Kokot
0f487e7d23 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix iconv_open basic test (#15611)
2024-08-28 14:31:24 +02:00
Peter Kokot
7878a2c322 Fix iconv_open basic test (#15611)
Transliteration works differently across the iconv implementations and
the system. When using GNU libiconv the output in this test is:
string(16) "Zlutouck'y kun\n"
(like on Windows). On glibc's built-in iconv output is:
string(15) "Zlutoucky kun\n"
2024-08-28 14:29:49 +02:00
Dmitry Stogov
12b854f91b Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-15502: Crash with JIT and Excimer (#15601)
2024-08-27 21:12:43 +03:00
Dmitry Stogov
eb87de1c87 Fix GH-15502: Crash with JIT and Excimer (#15601) 2024-08-27 21:12:29 +03:00
David Carlier
618edb5e15 Merge branch 'PHP-8.2' into PHP-8.3 2024-08-27 04:57:13 +01:00
David Carlier
cc67220ea3 Fixed GH-15547: curl_multi_wait expects a signed int for timeout.
confusion might come from the previous argument type.
PHP expects ms so we check it fits integer boundaries before the cast.
raising a warning at least for stable branches.

close GH-15548
2024-08-27 04:56:32 +01:00
Niels Dossche
8a00faa2bb Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-15551: Segmentation fault (access null pointer) in ext/dom/xml_common.h
2024-08-23 19:42:36 +02:00
Niels Dossche
9af574c26e Fix GH-15551: Segmentation fault (access null pointer) in ext/dom/xml_common.h
Closes GH-15556.
2024-08-23 19:40:42 +02:00
Jakub Zelenka
70c5e366f6 Revert fix for GH-14930: truncating readdir output (#15533) 2024-08-22 23:41:34 +01:00
Peter Kokot
9e63e20a2c Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-15515: Configure error grep illegal option q (#15516)
2024-08-21 15:54:56 +02:00
Christoph M. Becker
a3dbd39be0 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-15432: Heap corruption when querying a vector
2024-08-20 15:44:40 +02:00
Christoph M. Becker
b1211c1e4a Fix GH-15432: Heap corruption when querying a vector
Since the mysqlnd result set is arena allocated, we must not simply
free it, but rather call the appropriate `free_result` method.

Co-authored-by: Kamil Tekiela <tekiela246@gmail.com>
2024-08-20 15:43:21 +02:00
Ilija Tovilo
65a101f3a7 Disable LSAN for crashing SOAP tests (GH-14562) 2024-08-14 11:44:03 +02:00
David Carlier
f1e5c63837 Checks getrandom availability on solaris.
To fix part of GH-15381.
gcc nor clang provides a constant to distinguish illumos and solaris
not the system provides a kernel version stamp like the BSD.
thus, we simply check the symbol and remaing purposely conservative in
the existing logic, using it only for solaris to avoid unexpected
breakages for other systems. would need a different fix for higher
branches.

Close GH-15390
2024-08-13 20:54:12 +01:00
David Carlier
5c9c275743 Checks getrandom availability on solaris.
To fix part of GH-15381.
gcc nor clang provides a constant to distinguish illumos and solaris
not the system provides a kernel version stamp like the BSD.
thus, we simply check the symbol and remaing purposely conservative in
the existing logic, using it only for solaris to avoid unexpected
breakages for other systems. would need a different fix for higher
branches.

Close GH-15390
2024-08-13 20:50:15 +01:00
Christoph M. Becker
56703e5390 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix test expectation
2024-08-13 19:25:04 +02:00
Christoph M. Becker
1b52ecd78a Fix test expectation 2024-08-13 19:23:53 +02:00
David Carlier
cad0ce5382 CI disable leak sanitizer on two libedit tests temporarily.
the libedit dependency has a leak on wcsdup call on ubuntu focal

close GH-15279
2024-08-07 22:38:30 +01:00
Niels Dossche
1d56340831 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Revert "Fix bug #69280: SoapClient classmap doesn't support fully qualified class name (#14398)"
2024-08-07 10:03:35 +02:00
Niels Dossche
28290655e8 Revert "Fix bug #69280: SoapClient classmap doesn't support fully qualified class name (#14398)"
This reverts commit 476706165a.

Although the fix is correct, people are relying on the bug and their
code stopped working, see GH-15252.
2024-08-07 10:03:12 +02:00
Christoph M. Becker
e811bff3bb Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix odbc_data_source_001.phpt
2024-08-06 16:54:58 +02:00
Christoph M. Becker
6713d51631 Fix odbc_data_source_001.phpt
As of PHP 8.1.0, passing `null` to an `int` parameter is deprecated,
and as such the deprecation notice breaks the test.  So we instead pass
an integer, and to avoid hard-coding a value we just add the two
supported constants (which are supposed to have the values `1` and `2`,
respectively).

Closes GH-15254.
2024-08-06 16:54:19 +02:00
Niels Dossche
c38c6acfa8 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix crash when converting array data for array in shm in xxh3
2024-08-05 22:07:01 +02:00
Niels Dossche
ca84662c87 Fix crash when converting array data for array in shm in xxh3
Closes GH-15237.
2024-08-05 22:06:11 +02:00
Niels Dossche
e681d933d4 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix SoapFault property destruction
2024-08-05 22:03:21 +02:00
Niels Dossche
11fbe8801b Fix SoapFault property destruction
Two issues:
1) We should not modify the object when we pass invalid values
2) We should reset the properties to their default value otherwise we
   get a UAF.

Regressed in df219ccf9d

Closes GH-15248.
2024-08-05 22:02:51 +02:00
Niels Dossche
9913b83ce5 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-15179: Segmentation fault (null pointer dereference) in ext/standard/url_scanner_ex.re
2024-08-03 02:05:35 +02:00
Niels Dossche
67ce8759e8 Fix GH-15179: Segmentation fault (null pointer dereference) in ext/standard/url_scanner_ex.re
Based on analysis by Ilija: https://github.com/php/php-src/issues/15179#issuecomment-2261546902

* Apply suggestions from code review

Closes GH-15206.

Co-authored-by: Ilija Tovilo <ilija.tovilo@me.com>
2024-08-03 02:05:06 +02:00
Niels Dossche
4049594adf Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix UAF when removing doctype and using foreach iteration
2024-07-30 20:03:30 +02:00
Niels Dossche
b282dd749f Fix UAF when removing doctype and using foreach iteration
This is an old bug, but this is pretty easy to fix.
It's basically applying the same fix as I did for e878b9f.
Reported by YuanchengJiang.

Closes GH-15143.
2024-07-30 20:01:22 +02:00
Niels Dossche
9f570163b3 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix CI failure on macOS after Curl update
2024-07-28 14:34:35 +02:00
Niels Dossche
fdae7c23f0 Fix CI failure on macOS after Curl update 2024-07-28 14:34:26 +02:00
Niels Dossche
950d010cc5 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix nightly failure in test variation due to number of temp variables varying when observers are enabled
2024-07-27 16:37:09 +02:00