aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/jsonpath.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2023-07-20 14:23:46 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2023-07-20 14:23:46 -0400
commitc0f53139611cf6b24175bea27bfbddb0ea5b7378 (patch)
treeb2113ae9d1e36e890db31d5e1d12b7a1e97e2f0a /src/backend/utils/adt/jsonpath.c
parent7825a1b01e400434835253b4ff38dd96d823d454 (diff)
downloadpostgresql-c0f53139611cf6b24175bea27bfbddb0ea5b7378.tar.gz
postgresql-c0f53139611cf6b24175bea27bfbddb0ea5b7378.zip
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
Diffstat (limited to 'src/backend/utils/adt/jsonpath.c')
0 files changed, 0 insertions, 0 deletions