Skip to content

Commit ccd07b8

Browse files
committed
C++: Simplify cpp/sql-injection barrier
SQL sanitizers will not likely also be sources, so using `isBarrierIn` here does not make a lot of sense. I ran with and without this change on MRVA and got identical results.
1 parent e40f896 commit ccd07b8

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

cpp/ql/src/Security/CWE/CWE-089/SqlTainted.ql

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,7 @@ module SqlTaintedConfig implements DataFlow::ConfigSig {
4545

4646
predicate isBarrier(DataFlow::Node node) {
4747
node.asExpr().getUnspecifiedType() instanceof IntegralType
48-
}
49-
50-
predicate isBarrierIn(DataFlow::Node node) {
48+
or
5149
exists(SqlBarrierFunction sql, int arg, FunctionInput input |
5250
node.asIndirectArgument() = sql.getACallToThisFunction().getArgument(arg) and
5351
input.isParameterDeref(arg) and

0 commit comments

Comments
 (0)