Skip to content

Commit e2f671e

Browse files
committed
C++: Add more comments.
1 parent df9c756 commit e2f671e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,8 @@ private module InvalidPointerToDerefConfig implements DataFlow::StateConfigSig {
174174
}
175175

176176
predicate isBarrier(DataFlow::Node node, FlowState pai) {
177+
// `node = getABarrierNode(pai)` ensures that node < pai, so this node is safe to dereference.
178+
// Note that this is the only place where the `FlowState` is used in this configuration.
177179
node = InvalidPointerToDerefBarrier::getABarrierNode(pai)
178180
}
179181
}

0 commit comments

Comments
 (0)