Commit f2bf834
committed
ext/soap: to_zval_array() native stack overflow on cyclic encoded references.
Fix #22984
The array and apache Map decoders never registered the node being
decoded, unlike to_zval_object_ex(), so a child href or enc:ref pointing
back at an enclosing array recursed until the native stack was exhausted.
An empty holder is now registered before the children are converted, and
replaced by the completed value afterwards.1 parent a72e063 commit f2bf834
1 file changed
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
380 | 380 | | |
381 | 381 | | |
382 | 382 | | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
383 | 393 | | |
384 | 394 | | |
385 | 395 | | |
| |||
2536 | 2546 | | |
2537 | 2547 | | |
2538 | 2548 | | |
| 2549 | + | |
| 2550 | + | |
| 2551 | + | |
2539 | 2552 | | |
2540 | 2553 | | |
2541 | 2554 | | |
| |||
2672 | 2685 | | |
2673 | 2686 | | |
2674 | 2687 | | |
| 2688 | + | |
2675 | 2689 | | |
2676 | 2690 | | |
2677 | 2691 | | |
| |||
2729 | 2743 | | |
2730 | 2744 | | |
2731 | 2745 | | |
| 2746 | + | |
2732 | 2747 | | |
2733 | 2748 | | |
2734 | 2749 | | |
| |||
2798 | 2813 | | |
2799 | 2814 | | |
2800 | 2815 | | |
| 2816 | + | |
| 2817 | + | |
| 2818 | + | |
2801 | 2819 | | |
2802 | 2820 | | |
2803 | 2821 | | |
| 2822 | + | |
2804 | 2823 | | |
2805 | 2824 | | |
2806 | 2825 | | |
| |||
2830 | 2849 | | |
2831 | 2850 | | |
2832 | 2851 | | |
| 2852 | + | |
2833 | 2853 | | |
2834 | 2854 | | |
2835 | 2855 | | |
| |||
0 commit comments