Validate ltree siglen GiST option to be int-aligned master
authorAlexander Korotkov <[email protected]>
Sun, 23 Apr 2023 10:58:25 +0000 (13:58 +0300)
committerAlexander Korotkov <[email protected]>
Sun, 23 Apr 2023 11:30:09 +0000 (14:30 +0300)
commit8bbd0cce92be98de9f4f727b8bf66fe26e5831ea
tree4b43130fd13ea7a0ffe36e56da62ac872b64cd77
parentcd115c3530bd59bb0305d62ccef1c9504207ff4c
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
contrib/ltree/expected/ltree.out
contrib/ltree/ltree_gist.c
contrib/ltree/sql/ltree.sql
doc/src/sgml/ltree.sgml