forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit9089287
committed
Guard against null plan pointer in CachedPlanIsSimplyValid().
If both the passed-in plan pointer and plansource->gplan areNULL, CachedPlanIsSimplyValid would think that the plan pointeris possibly-valid and try to dereference it. For the one extantcall site in plpgsql, this situation doesn't normally happenwhich is why we've not noticed. However, it appears to be possibleif the previous use of the cached plan failed, as per report fromJustin 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.com1 parent29a0ccb commit9089287
1 file changed
+3
-1
lines changedLines changed: 3 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1440 | 1440 |
| |
1441 | 1441 |
| |
1442 | 1442 |
| |
1443 |
| - | |
| 1443 | + | |
| 1444 | + | |
| 1445 | + | |
1444 | 1446 |
| |
1445 | 1447 |
| |
1446 | 1448 |
| |
|
0 commit comments
Comments
(0)