pgsql: Avoid fetching past the end of the indoption array.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Avoid fetching past the end of the indoption array.
Date: 2019-04-07 22:19:34
Message-ID: E1hDG8U-0006DD-Lu@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Avoid fetching past the end of the indoption array.

pg_get_indexdef_worker carelessly fetched indoption entries even for
non-key index columns that don't have one. 99.999% of the time this
would be harmless, since the code wouldn't examine the value ... but
some fine day this will be a fetch off the end of memory, resulting
in SIGSEGV.

Detected through valgrind testing. Odd that the buildfarm's valgrind
critters haven't noticed.

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/a7ca25cf787c563a92eef5eff1a8d2bb1364a992

Modified Files
--------------
src/backend/utils/adt/ruleutils.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2019-04-08 04:46:15 pgsql: Fix partition tuple routing with dropped attributes
Previous Message Alvaro Herrera 2019-04-07 19:07:39 pgsql: psql \dP: list partitioned tables and indexes