C++: remove unneeded exists variables

This commit is contained in:
Robert Marsh
2023-06-01 11:28:12 -04:00
committed by Robert Marsh
parent 6e230e10f8
commit df4d156a36

View File

@@ -146,12 +146,12 @@ module ArrayAddressToDerefConfig implements DataFlow::StateConfigSig {
predicate isAdditionalFlowStep( predicate isAdditionalFlowStep(
DataFlow::Node node1, FlowState state1, DataFlow::Node node2, FlowState state2 DataFlow::Node node1, FlowState state1, DataFlow::Node node2, FlowState state2
) { ) {
exists(PointerArithmeticInstruction pai, Variable v, int size, int delta | exists(PointerArithmeticInstruction pai, Variable v |
state1 = TArray(v) and state1 = TArray(v) and
state2 = TOverflowArithmetic(pai) and state2 = TOverflowArithmetic(pai) and
pai.getLeft() = node1.asInstruction() and pai.getLeft() = node1.asInstruction() and
node2.asInstruction() = pai and node2.asInstruction() = pai and
pointerArithOverflow(pai, v, size, _, delta) pointerArithOverflow(pai, v, _, _, _)
) )
} }
} }