@@ -38,7 +38,7 @@ public static void ZipInputStreamSafe(InputStream inputStream) throws IOExceptio
3838 }
3939 FileOutputStream fos = new FileOutputStream ("/tmp/tmptmp" );
4040 BufferedOutputStream dest = new BufferedOutputStream (fos , BUFFER );
41- while (total + BUFFER <= TOOBIG && (count = zis .read (data , 0 , BUFFER )) != -1 ) { // $ hasTaintFlow="zis"
41+ while (total + BUFFER <= TOOBIG && (count = zis .read (data , 0 , BUFFER )) != -1 ) { // $ hasTaintFlow="zis" "this test gives a FP"
4242 dest .write (data , 0 , count );
4343 total += count ;
4444 }
@@ -78,7 +78,7 @@ public static void ZipInputStreamSafe2(InputStream inputStream) throws IOExcepti
7878 }
7979 FileOutputStream fos = new FileOutputStream (entry .getName ());
8080 BufferedOutputStream dest = new BufferedOutputStream (fos , BUFFER );
81- while ((count = zis .read (data , 0 , BUFFER )) != -1 ) { // $ hasTaintFlow="zis"
81+ while ((count = zis .read (data , 0 , BUFFER )) != -1 ) { // $ hasTaintFlow="zis" "this test gives a FP"
8282 dest .write (data , 0 , count );
8383 }
8484 dest .flush ();
@@ -100,7 +100,7 @@ public static void ZipInputStreamUnsafe(InputStream inputStream) throws IOExcept
100100 // Write the files to the disk
101101 FileOutputStream fos = new FileOutputStream (entry .getName ());
102102 BufferedOutputStream dest = new BufferedOutputStream (fos , BUFFER );
103- while ((count = zis .read (data , 0 , BUFFER )) != -1 ) { // $ hasTaintFlow="zis"
103+ while ((count = zis .read (data , 0 , BUFFER )) != -1 ) { // $ hasTaintFlow="zis"
104104 dest .write (data , 0 , count );
105105 }
106106 dest .flush ();
0 commit comments