@@ -267,32 +267,12 @@ private int argToParam(Call call, int arg) {
267
267
/** Access to a method that passes taint from qualifier to argument. */
268
268
private predicate qualifierToArgumentStep ( Expr tracked , Expr sink ) {
269
269
exists ( MethodAccess ma , int arg |
270
- taintPreservingQualifierToArgument ( ma .getMethod ( ) , argToParam ( ma , arg ) ) and
270
+ ma .getMethod ( ) . ( TaintPreservingCallable ) . transfersTaint ( - 1 , argToParam ( ma , arg ) ) and
271
271
tracked = ma .getQualifier ( ) and
272
272
sink = ma .getArgument ( arg )
273
273
)
274
274
}
275
275
276
- /** Methods that passes tainted data from qualifier to argument. */
277
- private predicate taintPreservingQualifierToArgument ( Method m , int arg ) {
278
- m .getDeclaringType ( ) .hasQualifiedName ( "java.io" , "ByteArrayOutputStream" ) and
279
- m .hasName ( "writeTo" ) and
280
- arg = 0
281
- or
282
- exists ( Method read |
283
- m .overrides * ( read ) and
284
- read .getDeclaringType ( ) .hasQualifiedName ( "java.io" , "InputStream" ) and
285
- read .hasName ( "read" ) and
286
- arg = 0
287
- )
288
- or
289
- m .getDeclaringType ( ) .getASupertype * ( ) .hasQualifiedName ( "java.io" , "Reader" ) and
290
- m .hasName ( "read" ) and
291
- arg = 0
292
- or
293
- m .( TaintPreservingCallable ) .transfersTaint ( - 1 , arg )
294
- }
295
-
296
276
/** Access to a method that passes taint from the qualifier. */
297
277
private predicate qualifierToMethodStep ( Expr tracked , MethodAccess sink ) {
298
278
( taintPreservingQualifierToMethod ( sink .getMethod ( ) ) or unsafeEscape ( sink ) ) and
0 commit comments