@@ -24,7 +24,7 @@ public static void ZipInputStreamSafe(InputStream inputStream) throws IOExceptio
2424 // FileInputStream fis = new FileInputStream(filename);
2525 CRC32 checkSum = new CRC32 ();
2626 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 ))) {
2828 ZipEntry entry ;
2929 int entries = 0 ;
3030 long total = 0 ;
@@ -63,7 +63,7 @@ public static void ZipInputStreamSafe2(InputStream inputStream) throws IOExcepti
6363 int BUFFER = 512 ;
6464 int TOOBIG = 100 * 1024 * 1024 ; // 100MB
6565 // 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 ))) {
6767 ZipEntry entry ;
6868 while ((entry = zis .getNextEntry ()) != null ) {
6969 System .out .println ("Extracting: " + entry );
@@ -91,7 +91,7 @@ public static void ZipInputStreamSafe2(InputStream inputStream) throws IOExcepti
9191 public static void ZipInputStreamUnsafe (InputStream inputStream ) throws IOException {
9292 int BUFFER = 512 ;
9393 // 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 ))) {
9595 ZipEntry entry ;
9696 while ((entry = zis .getNextEntry ()) != null ) {
9797 System .out .println ("Extracting: " + entry );
@@ -112,7 +112,7 @@ public static void ZipInputStreamUnsafe(InputStream inputStream) throws IOExcept
112112
113113 public static void GZipInputStreamUnsafe (InputStream inputStream ) throws IOException {
114114 int BUFFER = 512 ;
115- try (GZIPInputStream gzis = new GZIPInputStream (inputStream )) { // $ hasTaintFlow="inputStream"
115+ try (GZIPInputStream gzis = new GZIPInputStream (inputStream )) {
116116 int count ;
117117 byte [] data = new byte [BUFFER ];
118118 FileOutputStream fos = new FileOutputStream ("/tmp/tmp" );
@@ -127,7 +127,7 @@ public static void GZipInputStreamUnsafe(InputStream inputStream) throws IOExcep
127127
128128 public static void InflaterInputStreamUnsafe (InputStream inputStream ) throws IOException {
129129 int BUFFER = 512 ;
130- try (InflaterInputStream Izis = new InflaterInputStream (inputStream )) { // $ hasTaintFlow="inputStream"
130+ try (InflaterInputStream Izis = new InflaterInputStream (inputStream )) {
131131 int count ;
132132 byte [] data = new byte [BUFFER ];
133133 FileOutputStream fos = new FileOutputStream ("/tmp/tmp" );
@@ -156,7 +156,7 @@ public static void InflaterUnsafe(byte[] inputBytes) throws DataFormatException,
156156 public static void ZipFile1 (String zipFilePath ) throws DataFormatException , IOException {
157157 try {
158158 System .out .println ("zipFilePath = " + zipFilePath );
159- ZipFile zipFile = new ZipFile (zipFilePath ); // $ hasTaintFlow="zipFilePath"
159+ ZipFile zipFile = new ZipFile (zipFilePath );
160160 Enumeration <? extends ZipEntry > entries = zipFile .entries ();
161161 while (entries .hasMoreElements ()) {
162162 ZipEntry entry = entries .nextElement ();
0 commit comments