From e2f671e3270257f15f72c59ccfeaf8ef57ecd594 Mon Sep 17 00:00:00 2001 From: Mathias Vorreiter Pedersen Date: Mon, 14 Aug 2023 10:44:46 +0100 Subject: [PATCH] C++: Add more comments. --- .../InvalidPointerDereference/InvalidPointerToDereference.qll | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference/InvalidPointerToDereference.qll b/cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference/InvalidPointerToDereference.qll index 501a1ed1d15..4a2175809e6 100644 --- a/cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference/InvalidPointerToDereference.qll +++ b/cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference/InvalidPointerToDereference.qll @@ -174,6 +174,8 @@ private module InvalidPointerToDerefConfig implements DataFlow::StateConfigSig { } predicate isBarrier(DataFlow::Node node, FlowState pai) { + // `node = getABarrierNode(pai)` ensures that node < pai, so this node is safe to dereference. + // Note that this is the only place where the `FlowState` is used in this configuration. node = InvalidPointerToDerefBarrier::getABarrierNode(pai) } }