mirror of
https://github.com/github/codeql.git
synced 2026-01-30 06:42:57 +01:00
Allow write base to be inside an implicit dereference
This commit is contained in:
@@ -129,7 +129,10 @@ module ControlFlow {
|
||||
/** Holds if this node sets the value of field `f` on `base` to `rhs`. */
|
||||
predicate writesField(DataFlow::Node base, Field f, DataFlow::Node rhs) {
|
||||
exists(IR::FieldTarget trg | trg = self.getLhs() |
|
||||
trg.getBase() = base.asInstruction() and
|
||||
(
|
||||
trg.getBase() = base.asInstruction() or
|
||||
trg.getBase() = MkImplicitDeref(base.asExpr())
|
||||
) and
|
||||
trg.getField() = f and
|
||||
self.getRhs() = rhs.asInstruction()
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user