File tree Expand file tree Collapse file tree
src/experimental/dataflow/internal
test/experimental/dataflow/tainttracking/customSanitizer Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -176,8 +176,10 @@ class BarrierGuard extends GuardNode {
176176
177177 /** Gets a node guarded by this guard. */
178178 final ExprNode getAGuardedNode ( ) {
179- exists ( boolean testIsTrue |
180- this .checks ( result .asCfgNode ( ) , testIsTrue ) and
179+ exists ( Variable v , NameNode n , boolean testIsTrue |
180+ n .uses ( v ) and
181+ this .checks ( n , testIsTrue ) and
182+ result .asCfgNode ( ) .( NameNode ) .uses ( v ) and
181183 this .controlsNode ( result .asCfgNode ( ) , testIsTrue )
182184 )
183185 }
Original file line number Diff line number Diff line change 11import experimental.dataflow.tainttracking.TestTaintLib
22
33class IsSafeCheck extends DataFlow:: BarrierGuard {
4- Variable v ;
5-
6- IsSafeCheck ( ) {
7- this .( CallNode ) .getNode ( ) .getFunc ( ) .( Name ) .getId ( ) = "emulated_is_safe" and
8- this .( CallNode ) .getAnArg ( ) .( NameNode ) .uses ( v )
9- }
4+ IsSafeCheck ( ) { this .( CallNode ) .getNode ( ) .getFunc ( ) .( Name ) .getId ( ) = "emulated_is_safe" }
105
116 override predicate checks ( ControlFlowNode node , boolean testIsTrue ) {
12- node . ( NameNode ) . uses ( v ) and
7+ node = this . ( CallNode ) . getAnArg ( ) and
138 testIsTrue = true
149 }
1510}
You can’t perform that action at this time.
0 commit comments