mirror of https://github.com/citusdata/citus.git
Fix underflow initialization of default values
Initialization of queryWindowClause and queryOrderByLimit "memset" underflow these variables. It's possible due to the invalid usage sizeof this part of the program cause buffer overflow and function return data corruption in future changes.pull/3317/head
parent
7f4d13b470
commit
86ef68a657
|
@ -2078,11 +2078,11 @@ WorkerExtendedOpNode(MultiExtendedOp *originalOpNode,
|
||||||
bool queryHasAggregates = TargetListHasAggragates(originalTargetEntryList);
|
bool queryHasAggregates = TargetListHasAggragates(originalTargetEntryList);
|
||||||
|
|
||||||
/* initialize to default values */
|
/* initialize to default values */
|
||||||
memset(&queryTargetList, 0, sizeof(queryGroupClause));
|
memset(&queryTargetList, 0, sizeof(queryTargetList));
|
||||||
memset(&queryGroupClause, 0, sizeof(queryGroupClause));
|
memset(&queryGroupClause, 0, sizeof(queryGroupClause));
|
||||||
memset(&queryDistinctClause, 0, sizeof(queryGroupClause));
|
memset(&queryDistinctClause, 0, sizeof(queryDistinctClause));
|
||||||
memset(&queryWindowClause, 0, sizeof(queryGroupClause));
|
memset(&queryWindowClause, 0, sizeof(queryWindowClause));
|
||||||
memset(&queryOrderByLimit, 0, sizeof(queryGroupClause));
|
memset(&queryOrderByLimit, 0, sizeof(queryOrderByLimit));
|
||||||
|
|
||||||
/* calculate the next sort group index based on the original target list */
|
/* calculate the next sort group index based on the original target list */
|
||||||
Index nextSortGroupRefIndex = GetNextSortGroupRef(originalTargetEntryList);
|
Index nextSortGroupRefIndex = GetNextSortGroupRef(originalTargetEntryList);
|
||||||
|
|
Loading…
Reference in New Issue