C++: Add a sanitizer to 'cpp/cleartext-storage-buffer' to improve the performance of the query.

This commit is contained in:
Mathias Vorreiter Pedersen
2022-08-22 11:01:31 +01:00
parent c904ba1d16
commit 65abb54a73

View File

@@ -26,6 +26,10 @@ class ToBufferConfiguration extends TaintTracking::Configuration {
override predicate isSource(DataFlow::Node source) { source instanceof FlowSource }
override predicate isSanitizer(DataFlow::Node node) {
node.asExpr().getUnspecifiedType() instanceof IntegralType
}
override predicate isSink(DataFlow::Node sink) {
exists(BufferWrite::BufferWrite w | w.getASource() = sink.asExpr())
}