File tree Expand file tree Collapse file tree 2 files changed +15
-15
lines changed
javascript/ql/lib/semmle/javascript/dataflow Expand file tree Collapse file tree 2 files changed +15
-15
lines changed Original file line number Diff line number Diff line change @@ -2001,21 +2001,6 @@ deprecated private class CallAgainstEqualityCheck extends DerivedBarrierGuardNod
20012001 override predicate appliesTo ( Configuration cfg ) { isBarrierGuardInternal ( cfg , prev ) }
20022002}
20032003
2004- /**
2005- * A guard node for a variable in a negative condition, such as `x` in `if(!x)`.
2006- * Can be added to a `isBarrier` in a data-flow configuration to block flow through such checks.
2007- */
2008- class VarAccessBarrier extends DataFlow:: Node {
2009- VarAccessBarrier ( ) {
2010- exists ( ConditionGuardNode guard , SsaRefinementNode refinement |
2011- this = DataFlow:: ssaDefinitionNode ( refinement ) and
2012- refinement .getGuard ( ) = guard and
2013- guard .getTest ( ) instanceof VarAccess and
2014- guard .getOutcome ( ) = false
2015- )
2016- }
2017- }
2018-
20192004/**
20202005 * Holds if there is a path without unmatched return steps from `source` to `sink`.
20212006 */
Original file line number Diff line number Diff line change @@ -1708,3 +1708,18 @@ class RegExpCreationNode extends DataFlow::SourceNode {
17081708 result = this .getAReference ( DataFlow:: TypeTracker:: end ( ) )
17091709 }
17101710}
1711+
1712+ /**
1713+ * A guard node for a variable in a negative condition, such as `x` in `if(!x)`.
1714+ * Can be added to a `isBarrier` in a data-flow configuration to block flow through such checks.
1715+ */
1716+ class VarAccessBarrier extends DataFlow:: Node {
1717+ VarAccessBarrier ( ) {
1718+ exists ( ConditionGuardNode guard , SsaRefinementNode refinement |
1719+ this = DataFlow:: ssaDefinitionNode ( refinement ) and
1720+ refinement .getGuard ( ) = guard and
1721+ guard .getTest ( ) instanceof VarAccess and
1722+ guard .getOutcome ( ) = false
1723+ )
1724+ }
1725+ }
You can’t perform that action at this time.
0 commit comments