Skip to content

Commit a77c624

Browse files
committed
C++: Reduce code-duplication in 'cpp/overrun-write'.
1 parent 8cf25ba commit a77c624

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

cpp/ql/src/experimental/Likely Bugs/OverrunWriteProductFlow.ql

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -122,13 +122,9 @@ module ValidState {
122122
predicate isAdditionalFlowStep(
123123
DataFlow::Node node1, FlowState state1, DataFlow::Node node2, FlowState state2
124124
) {
125-
exists(AddInstruction add, Operand op, int delta |
126-
add.hasOperands(node1.asOperand(), op) and
127-
semBounded(getSemanticExpr(op.getDef()), any(SemZeroBound zero), delta, true, _) and
128-
node2.asInstruction() = add and
129-
state1 = [false, true] and
130-
state2 = state1.booleanNot()
131-
)
125+
isAdditionalFlowStep2(node1, node2, _) and
126+
state1 = [false, true] and
127+
state2 = state1.booleanNot()
132128
}
133129

134130
predicate includeHiddenNodes() { any() }

0 commit comments

Comments
 (0)