diff --git a/cpp/ql/src/Security/CWE/CWE-311/CleartextBufferWrite.ql b/cpp/ql/src/Security/CWE/CWE-311/CleartextBufferWrite.ql index c671ad5af7f..c03c433a532 100644 --- a/cpp/ql/src/Security/CWE/CWE-311/CleartextBufferWrite.ql +++ b/cpp/ql/src/Security/CWE/CWE-311/CleartextBufferWrite.ql @@ -51,7 +51,9 @@ module ToBufferConfig implements DataFlow::ConfigSig { predicate observeDiffInformedIncrementalMode() { any() } Location getASelectedSinkLocation(DataFlow::Node sink) { - exists(SensitiveBufferWrite w | result = w.getLocation() | isSinkImpl(sink, w)) + exists(SensitiveBufferWrite w | result = [w.getLocation(), sink.getLocation()] | + isSinkImpl(sink, w) + ) } }