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

139608 Commits

Author SHA1 Message Date
Niels Dossche
bfa2cfc9ed Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix NULL deref on high modification key
2025-04-16 11:38:38 +02:00
Niels Dossche
c905d59106 Fix NULL deref on high modification key
We should re-index in the loop.

Closes GH-18331.
2025-04-16 11:37:49 +02:00
Niels Dossche
ecd2872cf4 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix memory leak when handling a too long path in ZipArchive::addGlob()
  Fix uouv when handling empty options in ZipArchive::addGlob()
2025-04-16 10:46:17 +02:00
Niels Dossche
91c6c727d5 Fix memory leak when handling a too long path in ZipArchive::addGlob()
Closes GH-18330.
2025-04-16 10:45:35 +02:00
Niels Dossche
0a6326c6ac Fix uouv when handling empty options in ZipArchive::addGlob()
Reported by OpenAI AARDVARK.

php_zip_parse_option is only called when options are passed to the function.
Prior to this patch, php_zip_parse_option was responsible for zeroing the
opts variable. So in the case when php_zip_parse_option is not called,
opts remains uninitialized yet it is being used anyway.
By just always zeroing opts at declaration time, we avoid this issue
and we are unlikely to reintroduce this in the future.

Closes GH-18329.
2025-04-16 10:44:59 +02:00
Florian Engelhardt
061b46e09d Save opline in zend_jit_hot_func()
Closes GH-18289
2025-04-15 14:11:32 +02:00
Saki Takamachi
bd9f03a336 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fixed GH-18276 - persistent connection - "zend_mm_heap corrupted" with setAttribute() (#18280) Closes #18280 Fixes #18276
2025-04-15 09:04:39 +09:00
Saki Takamachi
9d4f8b5379 Fixed GH-18276 - persistent connection - "zend_mm_heap corrupted" with setAttribute() (#18280)
Closes #18280
Fixes #18276
2025-04-15 09:01:40 +09:00
Máté Kocsis
691e009f97 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Mark ob_start callback parameter nullable
2025-04-14 22:36:14 +02:00
haszi
701f3a1af6 Mark ob_start callback parameter nullable 2025-04-14 22:35:06 +02:00
Niels Dossche
fc63a98f17 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-18322: SplObjectStorage debug handler mismanages memory
2025-04-14 14:11:35 +02:00
Niels Dossche
67503870ca Fix GH-18322: SplObjectStorage debug handler mismanages memory
This hack was once necessary before there was a proper get_gc handler,
but now it breaks the engine constraints.

Closes GH-18323.
2025-04-14 14:11:09 +02:00
Niels Dossche
7415dc4649 Fix sxe test 2025-04-11 23:56:57 +02:00
Niels Dossche
a019fbd970 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-18309: ipv6 filter integer overflow
  Fix GH-18304: Changing the properties of a DateInterval through dynamic properties triggers a SegFault
2025-04-11 23:36:12 +02:00
Niels Dossche
8849a5336e Fix GH-18309: ipv6 filter integer overflow
The intermediate computation can cause a signed integer overflow, but
the input is correctly rejected later on by the check on variable `n`.
Solve this by using an unsigned number.

Closes GH-18312.
2025-04-11 23:35:00 +02:00
Niels Dossche
ba0853888d Fix GH-18304: Changing the properties of a DateInterval through dynamic properties triggers a SegFault
For dynamic fetches the cache_slot will be NULL, so we have to check for
that when resetting the cache. For zip and xmlreader this couldn't
easily be tested because of a lack of writable properties.

Closes GH-18307.
2025-04-11 23:33:58 +02:00
Niels Dossche
8a927c284d Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix potential leaks when writing to BIO fails
2025-04-11 21:02:59 +02:00
Niels Dossche
29f96fb1f1 Fix potential leaks when writing to BIO fails
When the BIO is created but writing fails, these can leak.

Closes GH-18186.
2025-04-11 21:02:37 +02:00
Niels Dossche
14853ea2f2 Fix reproducibility of test GH-17190
The test failure did not trigger for me when playing with the JIT code.
From the original issue report some INI settings were not set properly.
2025-04-11 17:54:28 +02:00
Niels Dossche
4a12a9f3e9 Fix GH-18294: assertion failure zend_jit_ir.c
The JIT helper `zend_jit_assign_op_to_typed_ref` expects a `zval*` as an
argument, so we have to store to the stack if OP1_DATA(=op3) is in a
register.

Closes GH-18299.
2025-04-11 17:54:19 +02:00
Remi Collet
94681850a1 [ci skip] fix news 2025-04-10 17:21:50 +02:00
Remi Collet
e41d1e4862 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  [ci skip] fix news
2025-04-10 17:21:26 +02:00
Remi Collet
90f582b188 [ci skip] fix news 2025-04-10 17:21:15 +02:00
Remi Collet
b3a43ca7a4 NEWS for GH-17940 2025-04-10 17:14:03 +02:00
Remi Collet
bcee2af398 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  NEWS for GH-17940
  Fix #17776 LDAP_OPT_X_TLS_REQUIRE_CERT can't be overridden
2025-04-10 17:13:37 +02:00
Remi Collet
98fb27a577 NEWS for GH-17940 2025-04-10 17:09:03 +02:00
Remi Collet
389de7c6bf Fix #17776 LDAP_OPT_X_TLS_REQUIRE_CERT can't be overridden 2025-04-10 17:07:15 +02:00
Ilija Tovilo
6d458caefe Fix prop info fetching from prop slot with added hooks
Fixes GH-18268
Closes GH-18271
2025-04-08 18:45:26 +02:00
Gina Peter Banyard
1e9e397122 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  ext/libxml: Fixed custom external entity loader returning an invalid resource leading to a confusing TypeError message
2025-04-07 12:59:57 +01:00
Gina Peter Banyard
61f704f269 ext/libxml: Fixed custom external entity loader returning an invalid resource leading to a confusing TypeError message
Closes GH-18096
2025-04-07 12:58:52 +01:00
David Carlier
fed948dbd4 Fixed GH-18247: dba_popen() memory leak on invalid path.
and a handful more error code paths.

close GH-18250
2025-04-05 18:29:24 +01:00
David Carlier
471995c5f7 Merge branch 'PHP-8.3' into PHP-8.4 2025-04-05 15:57:26 +01:00
David Carlier
fe8dffef5d Fixed GH-18243: imagettftext underflow/overflow on size argument.
close GH-18245
2025-04-05 15:56:45 +01:00
Ilija Tovilo
90fd764cd8 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  [skip ci] Restrict on-push freebsd build to main repo
2025-04-03 13:03:34 +02:00
Ilija Tovilo
821e3460fb Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [skip ci] Restrict on-push freebsd build to main repo
2025-04-03 13:03:06 +02:00
Ilija Tovilo
8b27c14aa9 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  [skip ci] Restrict on-push freebsd build to main repo
2025-04-03 13:02:51 +02:00
Ilija Tovilo
7a3383b482 [skip ci] Restrict on-push freebsd build to main repo
The same applies to all other push jobs, it was just forgotten here.
2025-04-03 13:01:59 +02:00
Niels Dossche
f4c594bfc6 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix resource leak in iptcembed() on error
2025-04-02 21:06:28 +02:00
Niels Dossche
8a1f6711bf Fix resource leak in iptcembed() on error
Closes GH-18225.
2025-04-02 21:05:48 +02:00
Niels Dossche
a6e76ac010 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix inverted call to php_openssl_store_errors()
  Fix openssl_random_pseudo_bytes() always setting strong_result to true
2025-04-02 20:25:32 +02:00
Niels Dossche
5e68671f88 Fix inverted call to php_openssl_store_errors()
This calls php_openssl_store_errors() in the success path right now,
change it to call php_openssl_store_errors() in the error path.
2025-04-02 20:25:21 +02:00
Niels Dossche
0dc600c69a Fix openssl_random_pseudo_bytes() always setting strong_result to true
This regressed in 62c7432f, prior to that commit the value was set to
false in case random number generation failed, but now even if an
exception is thrown it is set to true. This likely does not _really_
matter as the user will handle the exception, still the value in
$strong_result is observable.
2025-04-02 20:25:21 +02:00
Niels Dossche
d689ff63e8 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix memory leak in openssl_sign() when passing invalid algorithm
2025-04-02 20:18:57 +02:00
Niels Dossche
74720a22f3 Fix memory leak in openssl_sign() when passing invalid algorithm
Closes GH-18185.
2025-04-02 20:15:53 +02:00
Dmitry Stogov
79dc7a2d26 Update IR
IR commit: 8d17022fb61ebfed9f6be81a8182ea31202697ed
2025-04-02 16:20:09 +03:00
David Carlier
dc93f28381 Merge branch 'PHP-8.3' into PHP-8.4 2025-04-02 12:36:08 +01:00
David Carlier
2e47442a6b Fix GH-18212: fseek with SEEK_CUR and negative offset crash on debug
Triggers the assertion as with SEEK_CUR the stream position is set to a
negative value so we force the failure without affecting its position
instead.

close GH-18224
2025-04-02 12:34:50 +01:00
Ilija Tovilo
3ffb310fbd Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Use-after-free in extract() with EXTR_REFS
2025-04-01 16:34:33 +02:00
Ilija Tovilo
a21065e6eb Use-after-free in extract() with EXTR_REFS
Fixes GH-18209
Closes GH-18211
2025-04-01 16:33:30 +02:00
Niels Dossche
93826d9556 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Add missing EXTENSIONS section to intl test
2025-03-31 23:05:23 +02:00