mirror of
https://github.com/github/codeql.git
synced 2025-12-23 04:06:37 +01:00
C++: restrict flowstates in constant off-by-one query
This commit is contained in:
@@ -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 |
|
||||
|
||||
Reference in New Issue
Block a user