Skip to content

Commit 65abb54

Browse files
committed
C++: Add a sanitizer to 'cpp/cleartext-storage-buffer' to improve the performance of the query.
1 parent c904ba1 commit 65abb54

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cpp/ql/src/Security/CWE/CWE-311/CleartextBufferWrite.ql

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ class ToBufferConfiguration extends TaintTracking::Configuration {
2626

2727
override predicate isSource(DataFlow::Node source) { source instanceof FlowSource }
2828

29+
override predicate isSanitizer(DataFlow::Node node) {
30+
node.asExpr().getUnspecifiedType() instanceof IntegralType
31+
}
32+
2933
override predicate isSink(DataFlow::Node sink) {
3034
exists(BufferWrite::BufferWrite w | w.getASource() = sink.asExpr())
3135
}

0 commit comments

Comments
 (0)