forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit34f3b39
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 parentfa12cb7 commit34f3b39
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 |
| |
| |||
1487 | 1488 |
| |
1488 | 1489 |
| |
1489 | 1490 |
| |
| 1491 | + | |
| 1492 | + | |
| 1493 | + | |
1490 | 1494 |
| |
1491 | 1495 |
| |
1492 | 1496 |
| |
|
0 commit comments
Comments
(0)