pgsql: Validate ltree siglen GiST option to be int-aligned

From: Alexander Korotkov <akorotkov(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Validate ltree siglen GiST option to be int-aligned
Date: 2023-04-23 11:30:36
Message-ID: E1pqXvP-004UZt-9b@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Validate ltree siglen GiST option to be int-aligned

Unaligned siglen could lead to an unaligned access to subsequent key fields.

Backpatch to 13, where opclass options were introduced.

Reported-by: Alexander Lakhin
Bug: 17847
Discussion: https://postgr.es/m/17847-171232970bea406b%40postgresql.org
Reviewed-by: Tom Lane, Pavel Borisov, Alexander Lakhin
Backpatch-through: 13

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/8bbd0cce92be98de9f4f727b8bf66fe26e5831ea

Modified Files
--------------
contrib/ltree/expected/ltree.out | 9 +++++++--
contrib/ltree/ltree_gist.c | 17 ++++++++++++++++-
contrib/ltree/sql/ltree.sql | 2 ++
doc/src/sgml/ltree.sgml | 3 ++-
4 files changed, 27 insertions(+), 4 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Alexander Korotkov 2023-04-23 11:31:07 pgsql: Fix custom validators call in build_local_reloptions()
Previous Message Peter Geoghegan 2023-04-23 03:11:04 Re: pgsql: doc: add transaction processing chapter with internals info