postgresql/src
Tom Lane 291c025402 Guard against null plan pointer in CachedPlanIsSimplyValid().
If both the passed-in plan pointer and plansource->gplan are
NULL, CachedPlanIsSimplyValid would think that the plan pointer
is possibly-valid and try to dereference it.  For the one extant
call site in plpgsql, this situation doesn't normally happen
which is why we've not noticed. However, it appears to be possible
if the previous use of the cached plan failed, as per report from
Justin Pryzby.  Add an extra check to prevent crashing.
Back-patch to v13 where this code was added.

Discussion: https://postgr.es/m/ZLlV+STFz1l/WhAQ@telsasoft.com
2023-07-20 14:23:46 -04:00
..
backend Guard against null plan pointer in CachedPlanIsSimplyValid(). 2023-07-20 14:23:46 -04:00
bin Handle DROP DATABASE getting interrupted 2023-07-13 13:03:34 -07:00
common Fix JSON error reporting for many cases of erroneous string values. 2023-03-13 15:19:00 -04:00
fe_utils Clean up assorted failures under clang's -fsanitize=undefined checks. 2022-03-03 18:13:24 -05:00
include Handle DROP DATABASE getting interrupted 2023-07-13 13:03:34 -07:00
interfaces Translation updates 2023-05-08 14:36:07 +02:00
makefiles Remove libpq.rc, use win32ver.rc for libpq 2020-01-15 15:06:12 +01:00
pl Translation updates 2023-05-08 14:36:07 +02:00
port Re-allow building on Microsoft Visual Studio 2013. 2022-11-10 10:23:49 -05:00
template On NetBSD, force dynamic symbol resolution at postmaster start. 2022-08-30 17:29:08 -04:00
test Fix updates of indisvalid for partitioned indexes 2023-07-14 10:13:20 +09:00
timezone Update time zone data files to tzdata release 2023c. 2023-04-18 14:46:39 -04:00
tools Define OPENSSL_API_COMPAT 2023-06-24 20:22:57 +09:00
tutorial Doc: sync src/tutorial/basics.source with SGML documentation. 2022-11-19 13:09:14 -05:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Fix partial-build problems introduced by having more generated headers. 2018-04-09 16:42:10 -04:00
Makefile.global.in Fix prove_installcheck when used with PGXS 2023-05-05 07:11:58 +02:00
Makefile.shlib AIX: Fix missing libpq symbols by respecting SHLIB_EXPORTS. 2021-09-06 11:28:02 -07:00
nls-global.mk NLS: Fix backend gettext triggers 2019-09-23 09:04:20 +02:00