File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 6666 * module. Since the node we are tracking is not necessarily _equal_ to the pointer-arithmetic instruction, but rather satisfies
6767 * `node.asInstruction() <= pai + deltaDerefSourceAndPai`, we need to account for the delta when checking if a guard is sufficiently
6868 * strong to infer that a future dereference is safe. To do this, we check that the guard guarantees that a node `n` satisfies
69- * `n < node + k` where `node` is a node such that `node <= pai`. Thus, we know that any node `n' ` such that `n' <= n + delta` where
69+ * `n < node + k` where `node` is a node such that `node <= pai`. Thus, we know that any node `m ` such that `m <= n + delta` where
7070 * `delta + k <= 0` will be safe because:
7171 * ```
72- * n' <= n + delta
73- * < node + k + delta
74- * <= pai + k + delta
75- * <= pai
72+ * m <= n + delta
73+ * < node + k + delta
74+ * <= pai + k + delta
75+ * <= pai
7676 * ```
7777 */
7878
You can’t perform that action at this time.
0 commit comments