Update cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference/InvalidPointerToDereference.qll

Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
This commit is contained in:
Mathias Vorreiter Pedersen
2023-08-14 09:51:28 +01:00
committed by GitHub
parent 2c6bbd8060
commit c265113073

View File

@@ -114,11 +114,11 @@ private module InvalidPointerToDerefBarrier {
private predicate operandGuardChecks(
PointerArithmeticInstruction pai, IRGuardCondition g, Operand small, int k, boolean edge
) {
exists(DataFlow::Node source, DataFlow::Node nSmall, DataFlow::Node nBig |
exists(DataFlow::Node source, DataFlow::Node nSmall, DataFlow::Node nLarge |
nSmall.asOperand() = small and
BarrierConfig::isSource(source, pai) and
BarrierFlow::flow(source, nBig) and
BarrierConfig::isSink(nSmall, nBig, g, k, edge)
BarrierFlow::flow(source, nLarge) and
BarrierConfig::isSink(nSmall, nLarge, g, k, edge)
)
}