Prevent integer overflow when checking disk space
This commit is contained in:
parent
01f59608ac
commit
e81d1226fe
|
@ -582,7 +582,7 @@ class JarFileTests {
|
|||
|
||||
@Test
|
||||
void zip64JarThatExceedsZipSizeLimitCanBeRead() throws Exception {
|
||||
Assumptions.assumeTrue(this.tempDir.getFreeSpace() > 6 * 1024 * 1024 * 1024, "Insufficient disk space");
|
||||
Assumptions.assumeTrue(this.tempDir.getFreeSpace() > 6L * 1024 * 1024 * 1024, "Insufficient disk space");
|
||||
File zip64Jar = new File(this.tempDir, "zip64.jar");
|
||||
File entry = new File(this.tempDir, "entry.dat");
|
||||
CRC32 crc32 = new CRC32();
|
||||
|
|
|
@ -283,7 +283,7 @@ class ZipContentTests {
|
|||
|
||||
@Test
|
||||
void openWhenZip64ThatExceedsZipSizeLimitOpensZip() throws Exception {
|
||||
Assumptions.assumeTrue(this.tempDir.getFreeSpace() > 6 * 1024 * 1024 * 1024, "Insufficient disk space");
|
||||
Assumptions.assumeTrue(this.tempDir.getFreeSpace() > 6L * 1024 * 1024 * 1024, "Insufficient disk space");
|
||||
File zip64File = new File(this.tempDir, "zip64.zip");
|
||||
File entryFile = new File(this.tempDir, "entry.dat");
|
||||
CRC32 crc32 = new CRC32();
|
||||
|
|
Loading…
Reference in New Issue