C++: restrict flowstates in constant off-by-one query

This commit is contained in:
Robert Marsh
2023-05-12 12:43:10 -04:00
parent f77c77fdf9
commit 584adf843a

View File

@@ -89,8 +89,10 @@ predicate pointerArithOverflow(
module FieldAddressToDerefConfig implements DataFlow::StateConfigSig {
newtype FlowState =
additional TArray(Field f) or
additional TOverflowArithmetic(PointerArithmeticInstruction pai)
additional TArray(Field f) { pointerArithOverflow(_, f, _, _, _) } or
additional TOverflowArithmetic(PointerArithmeticInstruction pai) {
pointerArithOverflow(pai, _, _, _, _)
}
predicate isSource(DataFlow::Node source, FlowState state) {
exists(Field f |