aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/ri_triggers.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2023-05-04 11:48:23 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2023-05-04 11:48:23 -0400
commit4c40995f61227c579bd7269a829c00013ac66492 (patch)
treebba6e912c1d3a721a0327c9c78fa409b288c436e /src/backend/utils/adt/ri_triggers.c
parent0553528e7c2bb9eb4148ff9e3c51b9094ab67f70 (diff)
downloadpostgresql-4c40995f61227c579bd7269a829c00013ac66492.tar.gz
postgresql-4c40995f61227c579bd7269a829c00013ac66492.zip
In array_position()/array_positions(), beware of empty input array.
These functions incautiously fetched the array's first lower bound even when the array is zero-dimensional, thus fetching the word after the allocated array space. While almost always harmless, with very bad luck this could result in SIGSEGV. Fix by adding an early exit for empty input. Per bug #17920 from Alexander Lakhin. Discussion: https://postgr.es/m/17920-f7c228c627b6d02e%40postgresql.org
Diffstat (limited to 'src/backend/utils/adt/ri_triggers.c')
0 files changed, 0 insertions, 0 deletions