@@ -38,7 +38,7 @@ public static void ZipInputStreamSafe(InputStream inputStream) throws IOExceptio
38
38
}
39
39
FileOutputStream fos = new FileOutputStream ("/tmp/tmptmp" );
40
40
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"
42
42
dest .write (data , 0 , count );
43
43
total += count ;
44
44
}
@@ -78,7 +78,7 @@ public static void ZipInputStreamSafe2(InputStream inputStream) throws IOExcepti
78
78
}
79
79
FileOutputStream fos = new FileOutputStream (entry .getName ());
80
80
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"
82
82
dest .write (data , 0 , count );
83
83
}
84
84
dest .flush ();
@@ -100,7 +100,7 @@ public static void ZipInputStreamUnsafe(InputStream inputStream) throws IOExcept
100
100
// Write the files to the disk
101
101
FileOutputStream fos = new FileOutputStream (entry .getName ());
102
102
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"
104
104
dest .write (data , 0 , count );
105
105
}
106
106
dest .flush ();
0 commit comments