- Notifications
You must be signed in to change notification settings - Fork4.9k
Commit0398e07
committed
Prevent stack overflow in container-type functions.
A range type can name another range type as its subtype, and a recordtype can bear a column of another record type. Consequently, functionslike range_cmp() and record_recv() are recursive. Functions at riskinclude operator family members and referents of pg_type regproccolumns. Treat as recursive any such function that looks up and callsthe same-purpose function for a record column type or the range subtype.Back-patch to 9.0 (all supported versions).An array type's element type is never itself an array type, so arrayfunctions are unaffected. Recursion depth proportional to arraydimensionality, found in array_dim_to_jsonb(), is fine thanks to MAXDIM.1 parent188e081 commit0398e07
1 file changed
+13
-0
lines changedLines changed: 13 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
19 | 19 |
| |
20 | 20 |
| |
21 | 21 |
| |
| 22 | + | |
22 | 23 |
| |
23 | 24 |
| |
24 | 25 |
| |
| |||
88 | 89 |
| |
89 | 90 |
| |
90 | 91 |
| |
| 92 | + | |
| 93 | + | |
91 | 94 |
| |
92 | 95 |
| |
93 | 96 |
| |
| |||
310 | 313 |
| |
311 | 314 |
| |
312 | 315 |
| |
| 316 | + | |
| 317 | + | |
313 | 318 |
| |
314 | 319 |
| |
315 | 320 |
| |
| |||
477 | 482 |
| |
478 | 483 |
| |
479 | 484 |
| |
| 485 | + | |
| 486 | + | |
480 | 487 |
| |
481 | 488 |
| |
482 | 489 |
| |
| |||
667 | 674 |
| |
668 | 675 |
| |
669 | 676 |
| |
| 677 | + | |
| 678 | + | |
670 | 679 |
| |
671 | 680 |
| |
672 | 681 |
| |
| |||
826 | 835 |
| |
827 | 836 |
| |
828 | 837 |
| |
| 838 | + | |
| 839 | + | |
829 | 840 |
| |
830 | 841 |
| |
831 | 842 |
| |
| |||
1052 | 1063 |
| |
1053 | 1064 |
| |
1054 | 1065 |
| |
| 1066 | + | |
| 1067 | + | |
1055 | 1068 |
| |
1056 | 1069 |
| |
1057 | 1070 |
| |
|
0 commit comments
Comments
(0)