mirror of
https://github.com/github/codeql.git
synced 2026-04-28 02:05:14 +02:00
Support CharSequence#subSequence
This commit is contained in:
13
java/ql/test/library-tests/dataflow/taint/CharSeq.java
Normal file
13
java/ql/test/library-tests/dataflow/taint/CharSeq.java
Normal file
@@ -0,0 +1,13 @@
|
||||
public class CharSeq {
|
||||
public static String taint() { return "tainted"; }
|
||||
|
||||
public static void sink(Object o) { }
|
||||
|
||||
void test1() {
|
||||
CharSequence seq = taint().subSequence(0,1);
|
||||
sink(seq);
|
||||
|
||||
CharSequence seqFromSeq = seq.subSequence(0, 1);
|
||||
sink(seqFromSeq);
|
||||
}
|
||||
}
|
||||
@@ -37,6 +37,8 @@
|
||||
| B.java:15:21:15:27 | taint(...) | B.java:143:10:143:44 | toURL(...) |
|
||||
| B.java:15:21:15:27 | taint(...) | B.java:146:10:146:37 | toPath(...) |
|
||||
| B.java:15:21:15:27 | taint(...) | B.java:149:10:149:46 | toFile(...) |
|
||||
| CharSeq.java:7:26:7:32 | taint(...) | CharSeq.java:8:12:8:14 | seq |
|
||||
| CharSeq.java:7:26:7:32 | taint(...) | CharSeq.java:11:12:11:21 | seqFromSeq |
|
||||
| MethodFlow.java:7:22:7:28 | taint(...) | MethodFlow.java:8:10:8:16 | tainted |
|
||||
| MethodFlow.java:9:31:9:37 | taint(...) | MethodFlow.java:10:10:10:17 | tainted2 |
|
||||
| MethodFlow.java:11:35:11:41 | taint(...) | MethodFlow.java:12:10:12:17 | tainted3 |
|
||||
|
||||
Reference in New Issue
Block a user