File tree Expand file tree Collapse file tree
cpp/ql/src/Likely Bugs/Protocols Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212import cpp
1313import semmle.code.cpp.security.boostorg.asio.protocols
1414
15- class ExistsAnyFlowConfig extends DataFlow:: Configuration {
16- ExistsAnyFlowConfig ( ) { this = "ExistsAnyFlowConfig" }
17-
18- override predicate isSource ( DataFlow:: Node source ) {
15+ module ExistsAnyFlowConfig implements DataFlow:: ConfigSig {
16+ predicate isSource ( DataFlow:: Node source ) {
1917 exists ( BoostorgAsio:: SslContextClass c | c .getAContructorCall ( ) = source .asExpr ( ) )
2018 }
2119
22- override predicate isSink ( DataFlow:: Node sink ) {
20+ predicate isSink ( DataFlow:: Node sink ) {
2321 exists ( BoostorgAsio:: SslSetOptionsFunction f , FunctionCall fcSetOptions |
2422 f .getACallToThisFunction ( ) = fcSetOptions and
2523 fcSetOptions .getQualifier ( ) = sink .asExpr ( )
2624 )
2725 }
2826}
2927
28+ module ExistsAnyFlow = DataFlow:: Make< ExistsAnyFlowConfig > ;
29+
3030bindingset [ flag]
3131predicate isOptionSet ( ConstructorCall cc , int flag , FunctionCall fcSetOptions ) {
32- exists ( ExistsAnyFlowConfig anyFlowConfig , VariableAccess contextSetOptions |
33- anyFlowConfig . hasFlow ( DataFlow:: exprNode ( cc ) , DataFlow:: exprNode ( contextSetOptions ) ) and
32+ exists ( VariableAccess contextSetOptions |
33+ ExistsAnyFlow :: hasFlow ( DataFlow:: exprNode ( cc ) , DataFlow:: exprNode ( contextSetOptions ) ) and
3434 exists ( BoostorgAsio:: SslSetOptionsFunction f | f .getACallToThisFunction ( ) = fcSetOptions |
3535 contextSetOptions = fcSetOptions .getQualifier ( ) and
3636 forall (
You can’t perform that action at this time.
0 commit comments