@@ -24,7 +24,7 @@ public static void ZipInputStreamSafe(InputStream inputStream) throws IOExceptio
24
24
// FileInputStream fis = new FileInputStream(filename);
25
25
CRC32 checkSum = new CRC32 ();
26
26
CheckedInputStream gzis = new CheckedInputStream (inputStream , checkSum );
27
- try (ZipInputStream zis = new ZipInputStream (new BufferedInputStream (inputStream ))) { // $ hasTaintFlow="new BufferedInputStream(...)"
27
+ try (ZipInputStream zis = new ZipInputStream (new BufferedInputStream (inputStream ))) {
28
28
ZipEntry entry ;
29
29
int entries = 0 ;
30
30
long total = 0 ;
@@ -63,7 +63,7 @@ public static void ZipInputStreamSafe2(InputStream inputStream) throws IOExcepti
63
63
int BUFFER = 512 ;
64
64
int TOOBIG = 100 * 1024 * 1024 ; // 100MB
65
65
// FileInputStream fis = new FileInputStream(filename);
66
- try (ZipInputStream zis = new ZipInputStream (new BufferedInputStream (inputStream ))) { // $ hasTaintFlow="new BufferedInputStream(...)"
66
+ try (ZipInputStream zis = new ZipInputStream (new BufferedInputStream (inputStream ))) {
67
67
ZipEntry entry ;
68
68
while ((entry = zis .getNextEntry ()) != null ) {
69
69
System .out .println ("Extracting: " + entry );
@@ -91,7 +91,7 @@ public static void ZipInputStreamSafe2(InputStream inputStream) throws IOExcepti
91
91
public static void ZipInputStreamUnsafe (InputStream inputStream ) throws IOException {
92
92
int BUFFER = 512 ;
93
93
// FileInputStream fis = new FileInputStream(filename);
94
- try (ZipInputStream zis = new ZipInputStream (new BufferedInputStream (inputStream ))) { // $ hasTaintFlow="new BufferedInputStream(...)"
94
+ try (ZipInputStream zis = new ZipInputStream (new BufferedInputStream (inputStream ))) {
95
95
ZipEntry entry ;
96
96
while ((entry = zis .getNextEntry ()) != null ) {
97
97
System .out .println ("Extracting: " + entry );
@@ -112,7 +112,7 @@ public static void ZipInputStreamUnsafe(InputStream inputStream) throws IOExcept
112
112
113
113
public static void GZipInputStreamUnsafe (InputStream inputStream ) throws IOException {
114
114
int BUFFER = 512 ;
115
- try (GZIPInputStream gzis = new GZIPInputStream (inputStream )) { // $ hasTaintFlow="inputStream"
115
+ try (GZIPInputStream gzis = new GZIPInputStream (inputStream )) {
116
116
int count ;
117
117
byte [] data = new byte [BUFFER ];
118
118
FileOutputStream fos = new FileOutputStream ("/tmp/tmp" );
@@ -127,7 +127,7 @@ public static void GZipInputStreamUnsafe(InputStream inputStream) throws IOExcep
127
127
128
128
public static void InflaterInputStreamUnsafe (InputStream inputStream ) throws IOException {
129
129
int BUFFER = 512 ;
130
- try (InflaterInputStream Izis = new InflaterInputStream (inputStream )) { // $ hasTaintFlow="inputStream"
130
+ try (InflaterInputStream Izis = new InflaterInputStream (inputStream )) {
131
131
int count ;
132
132
byte [] data = new byte [BUFFER ];
133
133
FileOutputStream fos = new FileOutputStream ("/tmp/tmp" );
@@ -156,7 +156,7 @@ public static void InflaterUnsafe(byte[] inputBytes) throws DataFormatException,
156
156
public static void ZipFile1 (String zipFilePath ) throws DataFormatException , IOException {
157
157
try {
158
158
System .out .println ("zipFilePath = " + zipFilePath );
159
- ZipFile zipFile = new ZipFile (zipFilePath ); // $ hasTaintFlow="zipFilePath"
159
+ ZipFile zipFile = new ZipFile (zipFilePath );
160
160
Enumeration <? extends ZipEntry > entries = zipFile .entries ();
161
161
while (entries .hasMoreElements ()) {
162
162
ZipEntry entry = entries .nextElement ();
0 commit comments