This commit is contained in:
Arthur Baars 2020-07-02 16:05:09 +02:00
Родитель c629f6b13a
Коммит a07af79fff
1 изменённых файлов: 13 добавлений и 0 удалений

Просмотреть файл

@ -180,6 +180,12 @@ private predicate taintPreservingArgumentToMethod(Method method, int arg) {
or
method.hasName(["nCopies", "singletonMap"]) and arg = 1
)
or
method.getDeclaringType().hasQualifiedName("java.util", "Arrays") and
(
method.hasName(["copyOf", "copyOfRange", "deepToString", "spliterator", "stream", "toString"]) and
arg = 0
)
}
/**
@ -195,6 +201,13 @@ private predicate taintPreservingArgToArg(Method method, int input, int output)
or
method.hasName("replaceAll") and input = 2 and output = 0
)
or
method.getDeclaringType().hasQualifiedName("java.util", "Arrays") and
(
method.hasName(["fill", "parallelPrefix", "parallelSetAll", "setAll"]) and
output = 0 and
input = method.getNumberOfParameters() - 1
)
}
private predicate argToQualifierStep(Expr tracked, Expr sink) {