mirror of https://github.com/citusdata/citus.git
Assert bounds checks on two array reads which rely on data not being out of bounds
parent
bab4cff1c9
commit
ddc3377026
|
@ -373,6 +373,7 @@ TupleToDistributedResultFragment(TupleTableSlot *tupleSlot,
|
|||
text *resultId = DatumGetTextP(slot_getattr(tupleSlot, 3, &isNull));
|
||||
int64 rowCount = DatumGetInt64(slot_getattr(tupleSlot, 4, &isNull));
|
||||
|
||||
Assert(targetShardIndex < targetRelation->shardIntervalArrayLength);
|
||||
ShardInterval *shardInterval =
|
||||
targetRelation->sortedShardIntervalArray[targetShardIndex];
|
||||
|
||||
|
@ -443,6 +444,7 @@ ColocateFragmentsWithRelation(List *fragmentList, CitusTableCacheEntry *targetRe
|
|||
{
|
||||
int shardIndex = sourceFragment->targetShardIndex;
|
||||
|
||||
Assert(shardIndex < shardCount);
|
||||
shardResultIdList[shardIndex] = lappend(shardResultIdList[shardIndex],
|
||||
sourceFragment->resultId);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue