File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
semmle/code/cpp/ir/dataflow Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,9 @@ class Configuration extends TaintTrackingConfiguration {
2828 exists ( SQLLikeFunction runSql | runSql .outermostWrapperFunctionCall ( tainted , _) )
2929 }
3030
31- override predicate isAdditionalBarrier ( Expr e ) { e .getUnspecifiedType ( ) instanceof IntegralType }
31+ override predicate isBarrier ( Expr e ) {
32+ super .isBarrier ( e ) or e .getUnspecifiedType ( ) instanceof IntegralType
33+ }
3234}
3335
3436from
Original file line number Diff line number Diff line change @@ -545,8 +545,8 @@ module TaintedWithPath {
545545 /** Override this to specify which elements are sinks in this configuration. */
546546 abstract predicate isSink ( Element e ) ;
547547
548- /** Override this to specify additional barriers in this configuration. */
549- predicate isAdditionalBarrier ( Expr node ) { none ( ) }
548+ /** Override this to specify which expressions are barriers in this configuration. */
549+ predicate isBarrier ( Expr e ) { nodeIsBarrier ( getNodeForExpr ( e ) ) }
550550
551551 /**
552552 * Override this predicate to `any()` to allow taint to flow through global
@@ -582,10 +582,8 @@ module TaintedWithPath {
582582 }
583583
584584 override predicate isBarrier ( DataFlow:: Node node ) {
585- nodeIsBarrier ( node )
586- or
587585 exists ( TaintTrackingConfiguration cfg , Expr e |
588- cfg .isAdditionalBarrier ( e ) and node = getNodeForExpr ( e )
586+ cfg .isBarrier ( e ) and node = getNodeForExpr ( e )
589587 )
590588 }
591589
You can’t perform that action at this time.
0 commit comments