mirror of
https://github.com/github/codeql.git
synced 2026-04-28 18:25:24 +02:00
Apply suggestions from code review
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com>
This commit is contained in:
@@ -84,4 +84,22 @@ public class A {
|
||||
sink(wrapper); // $ hasTaintFlow
|
||||
}
|
||||
|
||||
public static InputStream wrapStream(InputStream in) {
|
||||
return new InputStream() {
|
||||
@Override
|
||||
public int read() throws IOException {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int read(byte[] b) throws IOException {
|
||||
return in.read(b);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public static void testWrapCall() {
|
||||
sink(wrapStream(null)); // no flow
|
||||
sink(wrapStream(source())); // $ hasTaintFlow
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user