mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Merge branch 'PHP-8.2' into PHP-8.3
This commit is contained in:
commit
3f28644fff
2 changed files with 13 additions and 4 deletions
2
NEWS
2
NEWS
|
@ -28,6 +28,8 @@ PHP NEWS
|
||||||
. Fixed bug GH-16508 (Incorrect line number in inheritance errors of delayed
|
. Fixed bug GH-16508 (Incorrect line number in inheritance errors of delayed
|
||||||
early bound classes). (ilutov)
|
early bound classes). (ilutov)
|
||||||
. Fixed bug GH-16648 (Use-after-free during array sorting). (ilutov)
|
. Fixed bug GH-16648 (Use-after-free during array sorting). (ilutov)
|
||||||
|
. Fixed bug GH-15915 (overflow with a high value for precision INI).
|
||||||
|
(David Carlier / cmb)
|
||||||
|
|
||||||
- Curl:
|
- Curl:
|
||||||
. Fixed bug GH-16302 (CurlMultiHandle holds a reference to CurlHandle if
|
. Fixed bug GH-16302 (CurlMultiHandle holds a reference to CurlHandle if
|
||||||
|
|
|
@ -3613,13 +3613,20 @@ rv_alloc(i) int i;
|
||||||
rv_alloc(int i)
|
rv_alloc(int i)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
int k, *r;
|
|
||||||
|
|
||||||
size_t j = sizeof(ULong);
|
int j, k, *r;
|
||||||
|
size_t rem;
|
||||||
|
|
||||||
|
rem = sizeof(Bigint) - sizeof(ULong) - sizeof(int);
|
||||||
|
|
||||||
|
|
||||||
|
j = sizeof(ULong);
|
||||||
|
if (i > ((INT_MAX >> 2) + rem))
|
||||||
|
zend_error_noreturn(E_ERROR, "rv_alloc() allocation overflow %d", i);
|
||||||
for(k = 0;
|
for(k = 0;
|
||||||
sizeof(Bigint) - sizeof(ULong) - sizeof(int) + j <= (size_t)i;
|
rem + j <= (size_t)i; j <<= 1)
|
||||||
j <<= 1)
|
|
||||||
k++;
|
k++;
|
||||||
|
|
||||||
r = (int*)Balloc(k);
|
r = (int*)Balloc(k);
|
||||||
*r = k;
|
*r = k;
|
||||||
return
|
return
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue