mirror of
https://github.com/postgres/postgres.git
synced 2025-06-27 23:21:58 +03:00
Avoid referencing off the end of subplan_partition_offsets.
Report by buildfarm member skink and Tom Lane. Analysis by me. Patch by Amit Khandekar. Discussion: http://postgr.es/m/CAJ3gD9fVA1iXQYhfqHP5n_TEd4U9=V8TL_cc-oKRnRmxgdvJrQ@mail.gmail.com
This commit is contained in:
@ -1812,7 +1812,8 @@ tupconv_map_for_subplan(ModifyTableState *mtstate, int whichplan)
|
||||
* If subplan-indexed array is NULL, things should have been arranged
|
||||
* to convert the subplan index to partition index.
|
||||
*/
|
||||
Assert(proute && proute->subplan_partition_offsets != NULL);
|
||||
Assert(proute && proute->subplan_partition_offsets != NULL &&
|
||||
whichplan < proute->num_subplan_partition_offsets);
|
||||
|
||||
leaf_index = proute->subplan_partition_offsets[whichplan];
|
||||
|
||||
|
Reference in New Issue
Block a user