Commit 6f96bb5
committed
Prevent use after free in flatten_join_alias_var_optimizer function
This patch prevents several use after free bugs present in
flatten_join_alias_var_optimizer. Specifically, the function uses
flatten_join_alias_vars function multiple times, and assumes that the
original node can be freed immediately after. This is not always the case
since under some circumstances flatten_join_alias_vars does not modify its
input and simply passes it through without copying. This patch adds conditions
to check if the original node can safely be freed, preventing use after free.1 parent 6e33101 commit 6f96bb5
1 file changed
+13
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5528 | 5528 | | |
5529 | 5529 | | |
5530 | 5530 | | |
5531 | | - | |
| 5531 | + | |
| 5532 | + | |
| 5533 | + | |
5532 | 5534 | | |
5533 | 5535 | | |
5534 | 5536 | | |
5535 | 5537 | | |
5536 | 5538 | | |
5537 | 5539 | | |
5538 | | - | |
| 5540 | + | |
| 5541 | + | |
5539 | 5542 | | |
5540 | 5543 | | |
5541 | 5544 | | |
5542 | 5545 | | |
5543 | 5546 | | |
5544 | 5547 | | |
5545 | | - | |
| 5548 | + | |
| 5549 | + | |
5546 | 5550 | | |
5547 | 5551 | | |
5548 | 5552 | | |
5549 | 5553 | | |
5550 | 5554 | | |
5551 | 5555 | | |
5552 | | - | |
| 5556 | + | |
| 5557 | + | |
5553 | 5558 | | |
5554 | 5559 | | |
5555 | 5560 | | |
5556 | 5561 | | |
5557 | 5562 | | |
5558 | 5563 | | |
5559 | | - | |
| 5564 | + | |
| 5565 | + | |
5560 | 5566 | | |
5561 | 5567 | | |
5562 | 5568 | | |
| |||
5583 | 5589 | | |
5584 | 5590 | | |
5585 | 5591 | | |
5586 | | - | |
| 5592 | + | |
| 5593 | + | |
5587 | 5594 | | |
5588 | 5595 | | |
5589 | 5596 | | |
| |||
0 commit comments