mirror of
https://github.com/github/codeql.git
synced 2026-04-27 17:55:19 +02:00
Merge pull request #1214 from asger-semmle/taint-addexpr-phi
Approved by esben-semmle, xiemaisi
This commit is contained in:
@@ -10,7 +10,7 @@ module StringConcatenation {
|
||||
result = expr.flow()
|
||||
or
|
||||
exists(SsaExplicitDefinition def | def.getDef() = expr |
|
||||
result = DataFlow::valueNode(def.getVariable().getAUse())
|
||||
result = DataFlow::ssaDefinitionNode(def)
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -366,7 +366,9 @@ module TaintTracking {
|
||||
* Note that since we cannot easily distinguish string append from addition,
|
||||
* we consider any `+` operation to propagate taint.
|
||||
*/
|
||||
class StringConcatenationTaintStep extends AdditionalTaintStep, DataFlow::ValueNode {
|
||||
class StringConcatenationTaintStep extends AdditionalTaintStep {
|
||||
StringConcatenationTaintStep() { StringConcatenation::taintStep(_, this) }
|
||||
|
||||
override predicate step(DataFlow::Node pred, DataFlow::Node succ) {
|
||||
succ = this and
|
||||
StringConcatenation::taintStep(pred, succ)
|
||||
|
||||
Reference in New Issue
Block a user