postgresql/src
Tom Lane f47004add1 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
2023-04-29 13:06:44 -04:00
..
backend Fix crashes with CREATE SCHEMA AUTHORIZATION and schema elements 2023-04-28 19:29:12 +09:00
bin Rework code defining default compression for dir/custom formats in pg_dump 2023-04-27 13:34:05 +09:00
common Introduce PG_IO_ALIGN_SIZE and align all I/O buffers. 2023-04-08 16:34:50 +12:00
fe_utils Revert refactoring of restore command code to shell_restore.c 2023-02-06 08:28:42 +09:00
include Fix crashes with CREATE SCHEMA AUTHORIZATION and schema elements 2023-04-28 19:29:12 +09:00
interfaces Remove duplicate lines of code 2023-04-24 11:16:17 +02:00
makefiles Use --strip-unneeded when stripping static libraries with GNU strip. 2023-04-20 18:12:32 -04:00
pl Tighten array dimensionality checks in Perl -> SQL array conversion. 2023-04-29 13:06:44 -04:00
port Fix various typos 2023-04-18 13:23:23 +12:00
template Use unnamed POSIX semaphores on Cygwin. 2023-01-06 10:33:28 +13:00
test Fix crashes with CREATE SCHEMA AUTHORIZATION and schema elements 2023-04-28 19:29:12 +09:00
timezone Update time zone data files to tzdata release 2023c. 2023-04-18 14:46:39 -04:00
tools Doc: update pgindent/README some more. 2023-04-22 11:52:46 -04:00
tutorial Remove useless casts to (void *) in arguments of some system functions 2023-02-07 06:57:59 +01:00
.gitignore
DEVELOPERS
Makefile Integrate pg_bsd_indent into our build/test infrastructure. 2023-02-12 12:22:21 -05:00
Makefile.global.in Update Unicode data to CLDR 43 2023-04-13 22:10:08 +02:00
Makefile.shlib autoconf: Rely on ar supporting index creation 2022-10-07 11:53:39 -07:00
meson.build Integrate pg_bsd_indent into our build/test infrastructure. 2023-02-12 12:22:21 -05:00
nls-global.mk Fix for make unportability 2022-07-13 09:15:01 +02:00