Skip to content

Commit 3026eb4

Browse files
committed
Revert "C++: Remove the same rule in TaintTrackingUtil.qll as 78b24b7 removed from DefaultTaintTracking.qll"
This reverts commit 0b97a4a.
1 parent 92d81ed commit 3026eb4

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/TaintTrackingUtil.qll

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,15 @@ private predicate localInstructionTaintStep(Instruction nodeFrom, Instruction no
5858
nodeFrom.getResultType() instanceof ArrayType or
5959
nodeFrom.getResultType() instanceof Union
6060
)
61+
or
62+
// Flow from an element to an array or union that contains it.
63+
nodeTo.(ChiInstruction).getPartial() = nodeFrom and
64+
not nodeTo.isResultConflated() and
65+
exists(Type t | nodeTo.getResultLanguageType().hasType(t, false) |
66+
t instanceof Union
67+
or
68+
t instanceof ArrayType
69+
)
6170
}
6271

6372
/**

0 commit comments

Comments
 (0)