mirror of
https://github.com/github/codeql.git
synced 2025-12-23 04:06:37 +01:00
C++: More pruning.
This commit is contained in:
@@ -101,7 +101,8 @@ private module SizeBarrier {
|
|||||||
predicate isSource(DataFlow::Node source) {
|
predicate isSource(DataFlow::Node source) {
|
||||||
// The sources is the same as in the sources for the second
|
// The sources is the same as in the sources for the second
|
||||||
// projection in the `AllocToInvalidPointerConfig` module.
|
// projection in the `AllocToInvalidPointerConfig` module.
|
||||||
hasSize(_, source, _)
|
hasSize(_, source, _) and
|
||||||
|
InterestingPointerAddInstruction::isInterestingSize(source)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -220,6 +221,13 @@ private module InterestingPointerAddInstruction {
|
|||||||
flowTo(n)
|
flowTo(n)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
predicate isInterestingSize(DataFlow::Node n) {
|
||||||
|
exists(DataFlow::Node alloc |
|
||||||
|
hasSize(alloc.asConvertedExpr(), n, _) and
|
||||||
|
flow(alloc, _)
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user