Validate ltree siglen GiST option to be int-aligned
authorAlexander Korotkov <akorotkov@postgresql.org>
Sun, 23 Apr 2023 10:58:25 +0000 (13:58 +0300)
committerAlexander Korotkov <akorotkov@postgresql.org>
Sun, 23 Apr 2023 11:00:16 +0000 (14:00 +0300)
commit48c6825d0ec8a5021e95aea666944e9345ceb77d
treea83660291627660d7172605b9aaa02a47529475d
parent02191136cb25670dc9f086248f7b495d68c965d5
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