remove redundant check

This commit is contained in:
Erik Krogh Kristensen
2020-06-11 12:18:41 +02:00
parent 1124816f73
commit f634c62af5

View File

@@ -117,11 +117,7 @@ private DataFlow::Node goodRandom(DataFlow::TypeTracker t, DataFlow::SourceNode
not exists(BinaryExpr binop | binop = result.asExpr() |
binop.getOperator().regexpMatch(".*(<|>).*")
or
binop.getOperator() = "*" and
(
isPowerOfTwo().asExpr() = binop.getAnOperand() or
binop.getAnOperand().(NumberLiteral).getValue().regexpMatch("0x0*10*")
)
binop.getOperator() = "*" and isPowerOfTwo().asExpr() = binop.getAnOperand()
or
binop.getOperator() = "+" and exists(binop.getAnOperand().getStringValue()) // string concat does not produce a number
)