Skip to content

Commit 4f07474

Browse files
committed
C++: Also allow custom sources in taintedWithoutGlobals
1 parent f4f96fe commit 4f07474

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cpp/ql/src/semmle/code/cpp/ir/dataflow/DefaultTaintTracking.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -734,8 +734,8 @@ module TaintedWithPath {
734734
* through a global variable.
735735
*/
736736
predicate taintedWithoutGlobals(Element tainted) {
737-
exists(PathNode sourceNode, FinalPathNode sinkNode |
738-
sourceNode.(WrapPathNode).inner().getNode() = getNodeForSource(_) and
737+
exists(AdjustedConfiguration cfg, PathNode sourceNode, FinalPathNode sinkNode |
738+
cfg.isSource(sourceNode.(WrapPathNode).inner().getNode()) and
739739
edgesWithoutGlobals+(sourceNode, sinkNode) and
740740
tainted = sinkNode.inner()
741741
)

0 commit comments

Comments
 (0)