mirror of
https://github.com/github/codeql.git
synced 2026-04-25 08:45:14 +02:00
Merge pull request #1004 from asger-semmle/suffix-check-bug
JS: Recognize '+' in suffix check
This commit is contained in:
@@ -95,9 +95,9 @@ predicate isDerivedFromLength(DataFlow::Node length, DataFlow::Node operand) {
|
||||
or
|
||||
isDerivedFromLength(length.getAPredecessor(), operand)
|
||||
or
|
||||
exists(SubExpr sub |
|
||||
isDerivedFromLength(sub.getAnOperand().flow(), operand) and
|
||||
length = sub.flow()
|
||||
exists(BinaryExpr expr | expr instanceof SubExpr or expr instanceof AddExpr |
|
||||
isDerivedFromLength(expr.getAnOperand().flow(), operand) and
|
||||
length = expr.flow()
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user