History log of /PHP-8.2/ext/com_dotnet/tests/variant_variation.phpt (Results 1 – 1 of 1)
Revision Date Author Comments
# 1ee56bdd 08-Oct-2024 Christoph M. Becker

Fix out of bound writes to SafeArray data

Converting PHP arrays to Variants originally supported almost arbitrary
numeric arrays, possibly filling gaps with NULL values. This is broken

Fix out of bound writes to SafeArray data

Converting PHP arrays to Variants originally supported almost arbitrary
numeric arrays, possibly filling gaps with NULL values. This is broken
as of PHP 7.0.0[1] so that the SafeArray only has as many elements as
the PHP array. Thus, unless the array is a list, some elements may be
written outside of the SafeArray data.

To avoid breaking userland code after that long time, we do not restore
the original behavior, but instead only suppress the erroneous writes.

To avoid the need to split the regression test for 32bit and 64bit
Windows, we suppress the "max number 4294967295 of elements in safe
array exceeded" warning, which only occurs for 64bit versions.

[1] <https://github.com/php/php-src/commit/c865472ef0c431cf3c6ec153736881d13e8a6883>

Closes GH-16309.

show more ...