forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit454edf1
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 parent9b06d91 commit454edf1
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 |
| |
| |||
1558 | 1559 |
| |
1559 | 1560 |
| |
1560 | 1561 |
| |
| 1562 | + | |
| 1563 | + | |
| 1564 | + | |
1561 | 1565 |
| |
1562 | 1566 |
| |
1563 | 1567 |
| |
|
0 commit comments
Comments
(0)