forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitb0f20c2
committed
Be more paranoid in ruleutils.c's get_variable().
We were merely Assert'ing that the Var matched the RTE it's supposedlyfrom. But if the user passes incorrect information to pg_get_expr(),the RTE might in fact not match; this led either to Assert failuresor core dumps, as reported by Chris Hanks in bug #14220. To fix, justconvert the Asserts to test-and-elog. Adjust an existing test-and-elogelsewhere in the same function to be consistent in wording.(If we really felt these were user-facing errors, we might promote them toereport's; but I can't convince myself that they're worth translating.)Back-patch to 9.3; the problematic code doesn't exist before that, anda quick check says that 9.2 doesn't crash on such cases.Michael Paquier and Thomas MunroReport: <20160629224349.1407.32667@wrigleys.postgresql.org>1 parent17bfef8 commitb0f20c2
1 file changed
+8
-3
lines changedLines changed: 8 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
5537 | 5537 |
| |
5538 | 5538 |
| |
5539 | 5539 |
| |
5540 |
| - | |
| 5540 | + | |
| 5541 | + | |
5541 | 5542 |
| |
5542 | 5543 |
| |
5543 | 5544 |
| |
| |||
5598 | 5599 |
| |
5599 | 5600 |
| |
5600 | 5601 |
| |
5601 |
| - | |
| 5602 | + | |
| 5603 | + | |
| 5604 | + | |
5602 | 5605 |
| |
5603 |
| - | |
| 5606 | + | |
| 5607 | + | |
| 5608 | + | |
5604 | 5609 |
| |
5605 | 5610 |
| |
5606 | 5611 |
| |
|
0 commit comments
Comments
(0)