Skip to content

Commit 6167627

Browse files
committed
C++: Fix barrier in cpp/cgi-xss
1 parent 3b777c2 commit 6167627

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cpp/ql/src/Security/CWE/CWE-079/CgiXss.ql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ module Config implements DataFlow::ConfigSig {
3535
}
3636

3737
predicate isBarrier(DataFlow::Node node) {
38-
node.asExpr().getUnspecifiedType() instanceof IntegralType
38+
isSink(node) and node.asExpr().getUnspecifiedType() instanceof ArithmeticType
39+
or
40+
node.asInstruction().(StoreInstruction).getResultType() instanceof ArithmeticType
3941
}
4042
}
4143

0 commit comments

Comments
 (0)