aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/array_userfuncs.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2023-04-29 13:06:44 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2023-04-29 13:06:44 -0400
commitce9a1a3ea8fe672a46502070d421f107f43d35dd (patch)
tree3bccae5bdea5362bba5056adf2f7bcaf1a42dd32 /src/backend/utils/adt/array_userfuncs.c
parent512c555221c33f1791ee28a4cfeb929fcd957fdd (diff)
downloadpostgresql-ce9a1a3ea8fe672a46502070d421f107f43d35dd.tar.gz
postgresql-ce9a1a3ea8fe672a46502070d421f107f43d35dd.zip
Tighten array dimensionality checks in Perl -> SQL array conversion.
plperl_array_to_datum() wasn't sufficiently careful about checking that nested lists represent a rectangular array structure; it would accept inputs such as "[1, []]". This is a bit related to the PL/Python bug fixed in commit 81eaaf65e, but it doesn't seem to provide any direct route to a memory stomp. Instead the likely failure mode is for makeMdArrayResult to be passed fewer Datums than the claimed array dimensionality requires, possibly leading to a wild pointer dereference and SIGSEGV. Per report from Alexander Lakhin. It's been broken for a long time, so back-patch to all supported branches. Discussion: https://postgr.es/m/5ebae5e4-d401-fadf-8585-ac3eaf53219c@gmail.com
Diffstat (limited to 'src/backend/utils/adt/array_userfuncs.c')
0 files changed, 0 insertions, 0 deletions