Commit 475e1ec
committed
Avoid deep recursion in
It is unusual, but possible that proxies contain proxies and could be deeply nested. Recursion over such objects causes stack overflow and should be avoided.
With this fix we will unwrap proxies to the inermost proxy without recursing.
Fixes: OS:18260402
Found by OSS-FuzzGetTypeOfString when dealing with proxies1 parent 7149247 commit 475e1ec
4 files changed
Lines changed: 40 additions & 4 deletions
File tree
- lib/Runtime/Library
- test/es6
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1621 | 1621 | | |
1622 | 1622 | | |
1623 | 1623 | | |
| 1624 | + | |
| 1625 | + | |
1624 | 1626 | | |
1625 | | - | |
| 1627 | + | |
1626 | 1628 | | |
1627 | 1629 | | |
1628 | 1630 | | |
1629 | 1631 | | |
1630 | 1632 | | |
1631 | 1633 | | |
1632 | 1634 | | |
1633 | | - | |
| 1635 | + | |
1634 | 1636 | | |
1635 | 1637 | | |
1636 | 1638 | | |
| |||
1649 | 1651 | | |
1650 | 1652 | | |
1651 | 1653 | | |
1652 | | - | |
| 1654 | + | |
| 1655 | + | |
| 1656 | + | |
1653 | 1657 | | |
1654 | 1658 | | |
1655 | 1659 | | |
| |||
1662 | 1666 | | |
1663 | 1667 | | |
1664 | 1668 | | |
1665 | | - | |
| 1669 | + | |
1666 | 1670 | | |
1667 | 1671 | | |
1668 | 1672 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
57 | 70 | | |
58 | 71 | | |
59 | 72 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| 115 | + | |
| 116 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
225 | 241 | | |
226 | 242 | | |
227 | 243 | | |
228 | 244 | | |
229 | 245 | | |
230 | 246 | | |
231 | 247 | | |
| 248 | + | |
0 commit comments