Skip to content

Commit 73138f1

Browse files
committed
C++: No need to exclude ExprNodes as sources now that #14903 is merged.
1 parent e89d8e2 commit 73138f1

File tree

3 files changed

+3
-11
lines changed

3 files changed

+3
-11
lines changed

cpp/ql/src/Security/CWE/CWE-114/UncontrolledProcessOperation.ql

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,7 @@ predicate isProcessOperationExplanation(DataFlow::Node arg, string processOperat
2727
)
2828
}
2929

30-
predicate isSource(FlowSource source, string sourceType) {
31-
not source instanceof DataFlow::ExprNode and
32-
sourceType = source.getSourceType()
33-
}
30+
predicate isSource(FlowSource source, string sourceType) { sourceType = source.getSourceType() }
3431

3532
module Config implements DataFlow::ConfigSig {
3633
predicate isSource(DataFlow::Node node) { isSource(node, _) }

cpp/ql/src/Security/CWE/CWE-134/UncontrolledFormatString.ql

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,7 @@ import semmle.code.cpp.ir.dataflow.TaintTracking
2121
import semmle.code.cpp.ir.IR
2222
import Flow::PathGraph
2323

24-
predicate isSource(FlowSource source, string sourceType) {
25-
not source instanceof DataFlow::ExprNode and
26-
sourceType = source.getSourceType()
27-
}
24+
predicate isSource(FlowSource source, string sourceType) { sourceType = source.getSourceType() }
2825

2926
module Config implements DataFlow::ConfigSig {
3027
predicate isSource(DataFlow::Node node) { isSource(node, _) }

cpp/ql/src/Security/CWE/CWE-290/AuthenticationBypass.ql

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,7 @@ predicate hardCodedAddressInCondition(Expr subexpression, Expr condition) {
6262
condition = any(IfStmt ifStmt).getCondition()
6363
}
6464

65-
predicate isSource(FS::FlowSource source, string sourceType) {
66-
source.getSourceType() = sourceType and not source instanceof DataFlow::ExprNode
67-
}
65+
predicate isSource(FS::FlowSource source, string sourceType) { source.getSourceType() = sourceType }
6866

6967
predicate isSink(DataFlow::Node sink, Expr condition) {
7068
hardCodedAddressInCondition([sink.asExpr(), sink.asIndirectExpr()], condition)

0 commit comments

Comments
 (0)