File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
java/ql/src/semmle/code/java/dataflow Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -363,6 +363,10 @@ module TaintTracking {
363363 m .getDeclaringType ( ) .hasQualifiedName ( "java.io" , "InputStream" ) and
364364 m .hasName ( "read" ) and
365365 arg = 0
366+ or
367+ m .getDeclaringType ( ) .getASupertype * ( ) .hasQualifiedName ( "java.io" , "Reader" ) and
368+ m .hasName ( "read" ) and
369+ arg = 0
366370 }
367371
368372 /** Access to a method that passes taint from the qualifier. */
@@ -398,8 +402,12 @@ module TaintTracking {
398402 m .getName ( ) .matches ( "%Value" )
399403 )
400404 or
401- m .getDeclaringType ( ) .getQualifiedName ( ) .matches ( "%Reader" ) and
402- m .getName ( ) .matches ( "read%" )
405+ m .getDeclaringType ( ) .getASupertype * ( ) .hasQualifiedName ( "java.io" , "Reader" ) and
406+ (
407+ m .getName ( ) = "read" and m .getNumberOfParameters ( ) = 0
408+ or
409+ m .getName ( ) = "readLine"
410+ )
403411 or
404412 m .getDeclaringType ( ) .getQualifiedName ( ) .matches ( "%StringWriter" ) and
405413 m .getName ( ) = "toString"
You can’t perform that action at this time.
0 commit comments