Skip to content

Commit 908cc40

Browse files
aschackmullmichaelnebel
authored andcommitted
Java: Fix bug in model flow sanitizer.
1 parent 16a5ccd commit 908cc40

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

java/ql/src/utils/model-generator/CaptureSummaryModels.ql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,9 @@ class ThroughFlowConfig extends TaintTracking::Configuration {
8080
)
8181
}
8282

83-
override predicate isSanitizer(DataFlow::Node n) { not isRelevantType(n.getType()) }
83+
override predicate isSanitizer(DataFlow::Node n) {
84+
exists(Type t | t = n.getType() and not isRelevantType(t))
85+
}
8486

8587
override DataFlow::FlowFeature getAFeature() {
8688
result instanceof DataFlow::FeatureEqualSourceSinkCallContext

java/ql/test/utils/model-generator/CaptureSummaryModels.expected

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
| p;Joiner;false;merge;(Joiner);;Argument[-1];ReturnValue;value |
2222
| p;Joiner;false;setEmptyValue;(CharSequence);;Argument[-1];ReturnValue;value |
2323
| p;Joiner;false;setEmptyValue;(CharSequence);;Argument[0];Argument[-1];taint |
24-
| p;Joiner;false;setEmptyValue;(CharSequence);;Argument[0];ReturnValue;taint |
2524
| p;Joiner;false;toString;();;Argument[-1];ReturnValue;taint |
2625
| p;MultipleImpls$Strat2;true;getValue;();;Argument[-1];ReturnValue;taint |
2726
| p;MultipleImpls$Strategy;true;doSomething;(String);;Argument[0];Argument[-1];taint |

0 commit comments

Comments
 (0)