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
2001
2001
override predicate appliesTo ( Configuration cfg ) { isBarrierGuardInternal ( cfg , prev ) }
2002
2002
}
2003
2003
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
-
2019
2004
/**
2020
2005
* Holds if there is a path without unmatched return steps from `source` to `sink`.
2021
2006
*/
Original file line number Diff line number Diff line change @@ -1708,3 +1708,18 @@ class RegExpCreationNode extends DataFlow::SourceNode {
1708
1708
result = this .getAReference ( DataFlow:: TypeTracker:: end ( ) )
1709
1709
}
1710
1710
}
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