Skip to content

Commit 4b8575b

Browse files
committed
C++: Simplify the query slightly.
1 parent b3d838d commit 4b8575b

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,11 @@ class ToBufferConfiguration extends TaintTracking::Configuration {
6060

6161
from
6262
ToBufferConfiguration config, SensitiveBufferWrite w, DataFlow::PathNode sourceNode,
63-
DataFlow::PathNode sinkNode, FlowSource source, SensitiveExpr dest
63+
DataFlow::PathNode sinkNode, FlowSource source
6464
where
6565
config.hasFlowPath(sourceNode, sinkNode) and
6666
sourceNode.getNode() = source and
67-
w.getASource() = sinkNode.getNode().asExpr() and
68-
dest = w.getDest()
67+
w.getASource() = sinkNode.getNode().asExpr()
6968
select w, sourceNode, sinkNode,
70-
"This write into buffer '" + dest.toString() + "' may contain unencrypted data from $@.", source,
71-
"user input (" + source.getSourceType() + ")"
69+
"This write into buffer '" + w.getDest().toString() + "' may contain unencrypted data from $@.",
70+
source, "user input (" + source.getSourceType() + ")"

0 commit comments

Comments
 (0)