-
Notifications
You must be signed in to change notification settings - Fork 8k
Commit 1ee56bd
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] <c865472>
Closes GH-16309.1 parent e49d732 commit 1ee56bd
File tree
3 files changed
+37
-3
lines changed- ext/com_dotnet
- tests
3 files changed
+37
-3
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2 | 2 |
| |
3 | 3 |
| |
4 | 4 |
| |
5 | + | ||
6 | + | ||
7 | + | ||
5 | 8 |
| |
6 | 9 |
| |
7 | 10 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
26 | 26 |
| |
27 | 27 |
| |
28 | 28 |
| |
29 | - | ||
30 | - | ||
29 | + | ||
31 | 30 |
| |
32 | 31 |
| |
33 | 32 |
| |
| |||
71 | 70 |
| |
72 | 71 |
| |
73 | 72 |
| |
74 | - | ||
73 | + | ||
74 | + | ||
75 | + | ||
75 | 76 |
| |
76 | 77 |
| |
77 | 78 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | + | ||
2 | + | ||
3 | + | ||
4 | + | ||
5 | + | ||
6 | + | ||
7 | + | ||
8 | + | ||
9 | + | ||
10 | + | ||
11 | + | ||
12 | + | ||
13 | + | ||
14 | + | ||
15 | + | ||
16 | + | ||
17 | + | ||
18 | + | ||
19 | + | ||
20 | + | ||
21 | + | ||
22 | + | ||
23 | + | ||
24 | + | ||
25 | + | ||
26 | + | ||
27 | + | ||
28 | + | ||
29 | + | ||
30 | + |
0 commit comments