mirror of
https://github.com/github/codeql.git
synced 2025-12-17 17:23:36 +01:00
Ruby: Block flow from LHS of && expressions
The only values that can flow from the LHS of an && expression are `false` and `nil`, neither of which seem relevant for any of our queries.
This commit is contained in:
@@ -220,8 +220,10 @@ module LocalFlow {
|
|||||||
or
|
or
|
||||||
nodeTo.asExpr() =
|
nodeTo.asExpr() =
|
||||||
any(CfgNodes::ExprNodes::BinaryOperationCfgNode op |
|
any(CfgNodes::ExprNodes::BinaryOperationCfgNode op |
|
||||||
op.getExpr() instanceof BinaryLogicalOperation and
|
op.getExpr() instanceof LogicalOrExpr and
|
||||||
nodeFrom.asExpr() = op.getAnOperand()
|
nodeFrom.asExpr() = op.getAnOperand()
|
||||||
|
or
|
||||||
|
op.getExpr() instanceof LogicalAndExpr and nodeFrom.asExpr() = op.getRightOperand()
|
||||||
)
|
)
|
||||||
or
|
or
|
||||||
nodeTo.(ParameterNodeImpl).getParameter() =
|
nodeTo.(ParameterNodeImpl).getParameter() =
|
||||||
|
|||||||
Reference in New Issue
Block a user