Skip to content

Commit b510204

Browse files
authored
Fix comments.
1 parent f5e4725 commit b510204

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

cpp/ql/src/semmle/code/cpp/ir/dataflow/DefaultTaintTracking.qll

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ private predicate instructionToOperandTaintStep(Instruction fromInstr, Operand t
214214
// We only do this in certain cases:
215215
// 1. The instruction's result must not be conflated, and
216216
// 2. The instruction's result type is one the types where we expect element-to-object flow. Currently
217-
// this array types and union types. This matches the other two cases of element-to-object flow in
217+
// this is array types and union types. This matches the other two cases of element-to-object flow in
218218
// `DefaultTaintTracking`.
219219
toOperand.getAnyDef() = fromInstr and
220220
not fromInstr.isResultConflated() and
@@ -326,14 +326,15 @@ private predicate operandToInstructionTaintStep(Operand fromOperand, Instruction
326326
// Until we have from through indirections across calls, we'll take flow out
327327
// of the parameter and into its indirection.
328328
// `InitializeIndirectionInstruction` only has a single operand: the address of the
329-
// value whose direction we are initializing. When initializing an indirection of a parameter `p`,
329+
// value whose indirection we are initializing. When initializing an indirection of a parameter `p`,
330330
// the IR looks like this:
331331
// ```
332332
// m1 = InitializeParameter[p] : &r1
333333
// r2 = Load[p] : r2, m1
334334
// m3 = InitializeIndirection[p] : &r2
335335
// ```
336-
// So by having flow from r2 to m3 we're enabling flow from `m1` to `m3`.
336+
// So by having flow from `r2` to `m3` we're enabling flow from `m1` to `m3`. This relies on the
337+
// `LoadOperand`'s overlap being exact.
337338
toInstr.(InitializeIndirectionInstruction).getAnOperand() = fromOperand
338339
}
339340

0 commit comments

Comments
 (0)