mirror of
https://github.com/github/codeql.git
synced 2026-04-29 18:55:14 +02:00
JS: treat +/- equally in suffix check query
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