mirror of
https://github.com/github/codeql.git
synced 2025-12-20 10:46:30 +01:00
It does so by first defining what a pointer dereference is (on the IR `Instruction` level), and then using the array length analysis and the range analysis together to prove that some of these pointer dereferences are safe.
7 lines
171 B
Plaintext
7 lines
171 B
Plaintext
import cpp
|
|
import experimental.semmle.code.cpp.rangeanalysis.InBoundsPointerDeref
|
|
|
|
from PointerDereferenceInstruction ptrAccess
|
|
where inBounds(ptrAccess)
|
|
select ptrAccess
|