Skip to content

Commit 9fad42b

Browse files
committed
Kotlin: Add manual model for Array.withIndex
1 parent bb82bca commit 9fad42b

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

java/ql/lib/semmle/code/java/frameworks/kotlin/StdLib.qll

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ private import semmle.code.java.dataflow.ExternalFlow
66
private class KotlinStdLibSummaryCsv extends SummaryModelCsv {
77
override predicate row(string row) {
88
row =
9-
"kotlin.jvm.internal;ArrayIteratorKt;false;iterator;(Object[]);;Argument[0].ArrayElement;ReturnValue.Element;value;manual"
9+
[
10+
"kotlin.jvm.internal;ArrayIteratorKt;false;iterator;(Object[]);;Argument[0].ArrayElement;ReturnValue.Element;value;manual",
11+
"kotlin.collections;ArraysKt;false;withIndex;(Object[]);;Argument[0].ArrayElement;ReturnValue;taint;manual"
12+
]
1013
}
1114
}

java/ql/test/kotlin/library-tests/dataflow/summaries/test.expected

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,3 @@
33
| test.kt:41:17:41:22 | getSecond(...) | Unexpected result: hasTaintFlow=e |
44
| test.kt:53:17:53:24 | getDuration(...) | Unexpected result: hasTaintFlow=f |
55
| test.kt:58:18:58:29 | component2(...) | Unexpected result: hasTaintFlow=g |
6-
| test.kt:66:53:66:71 | // $ hasTaintFlow=i | Missing result:hasTaintFlow=i |
7-
| test.kt:67:53:67:71 | // $ hasTaintFlow=i | Missing result:hasTaintFlow=i |
8-
| test.kt:68:53:68:71 | // $ hasTaintFlow=i | Missing result:hasTaintFlow=i |
9-
| test.kt:71:53:71:71 | // $ hasTaintFlow=i | Missing result:hasTaintFlow=i |

0 commit comments

Comments
 (0)