File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
cpp/ql/src/Likely Bugs/Protocols Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 12
12
import cpp
13
13
import semmle.code.cpp.security.boostorg.asio.protocols
14
14
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 ) {
19
17
exists ( BoostorgAsio:: SslContextClass c | c .getAContructorCall ( ) = source .asExpr ( ) )
20
18
}
21
19
22
- override predicate isSink ( DataFlow:: Node sink ) {
20
+ predicate isSink ( DataFlow:: Node sink ) {
23
21
exists ( BoostorgAsio:: SslSetOptionsFunction f , FunctionCall fcSetOptions |
24
22
f .getACallToThisFunction ( ) = fcSetOptions and
25
23
fcSetOptions .getQualifier ( ) = sink .asExpr ( )
26
24
)
27
25
}
28
26
}
29
27
28
+ module ExistsAnyFlow = DataFlow:: Make< ExistsAnyFlowConfig > ;
29
+
30
30
bindingset [ flag]
31
31
predicate 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
34
34
exists ( BoostorgAsio:: SslSetOptionsFunction f | f .getACallToThisFunction ( ) = fcSetOptions |
35
35
contextSetOptions = fcSetOptions .getQualifier ( ) and
36
36
forall (
You can’t perform that action at this time.
0 commit comments