diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2016-07-01 11:40:22 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2016-07-01 11:40:22 -0400 |
commit | b25d87f91d39eb8aff259766141ddd2d2d374b41 (patch) | |
tree | 59fa1afc75514d098916f691a20fd2c7db9eb27a /src/backend/access/gist | |
parent | 1843d88e0d3ffb1f2f1c4457e42f25d3bf1c8505 (diff) | |
download | postgresql-b25d87f91d39eb8aff259766141ddd2d2d374b41.tar.gz postgresql-b25d87f91d39eb8aff259766141ddd2d2d374b41.zip |
Be more paranoid in ruleutils.c's get_variable().
We were merely Assert'ing that the Var matched the RTE it's supposedly
from. But if the user passes incorrect information to pg_get_expr(),
the RTE might in fact not match; this led either to Assert failures
or core dumps, as reported by Chris Hanks in bug #14220. To fix, just
convert the Asserts to test-and-elog. Adjust an existing test-and-elog
elsewhere in the same function to be consistent in wording.
(If we really felt these were user-facing errors, we might promote them to
ereport'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, and
a quick check says that 9.2 doesn't crash on such cases.
Michael Paquier and Thomas Munro
Report: <20160629224349.1407.32667@wrigleys.postgresql.org>
Diffstat (limited to 'src/backend/access/gist')
0 files changed, 0 insertions, 0 deletions