forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitf8ffe62
committed
Check for stack overflow in transformSetOperationTree().
Since transformSetOperationTree() recurses, it can be driven to stackoverflow with enough UNION/INTERSECT/EXCEPT clauses in a query. Add acheck to ensure it fails cleanly instead of crashing. Per report fromMatthew Gerber (though it's not clear whether this is the only thinggoing wrong for him).Historical note: I think the reasoning behind not putting a check here inthe beginning was that the check in transformExpr() ought to be sufficientto guard the whole parser. However, because transformSetOperationTree()recurses all the way to the bottom of the set-operation tree before doingany analysis of the statement's expressions, that check doesn't save it.1 parent1458f0f commitf8ffe62
1 file changed
+4
-0
lines changedLines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
26 | 26 |
| |
27 | 27 |
| |
28 | 28 |
| |
| 29 | + | |
29 | 30 |
| |
30 | 31 |
| |
31 | 32 |
| |
| |||
1520 | 1521 |
| |
1521 | 1522 |
| |
1522 | 1523 |
| |
| 1524 | + | |
| 1525 | + | |
| 1526 | + | |
1523 | 1527 |
| |
1524 | 1528 |
| |
1525 | 1529 |
| |
|
0 commit comments
Comments
(0)