ZipEntry.java (setCrc): Fix overflow.

2000-02-19  Bryce McKinlay  <bryce@albatross.co.nz>

        * java/util/zip/ZipEntry.java (setCrc): Fix overflow.
        (setSize): ditto.

From-SVN: r32062
This commit is contained in:
Bryce McKinlay 2000-02-19 02:54:14 +00:00 committed by Bryce McKinlay
parent 488d3985f2
commit a0e34aaae4
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2000-02-19 Bryce McKinlay <bryce@albatross.co.nz>
* java/util/zip/ZipEntry.java (setCrc): Fix overflow.
(setSize): ditto.
2000-02-18 Tom Tromey <tromey@cygnus.com>
* include/jvm.h (_Jv_GetJavaVM): Declare.

View File

@ -94,7 +94,7 @@ public class ZipEntry implements ZipConstants
public void setCrc (long crc)
{
if (crc < 0 || crc > 0xffffffff)
if (crc < 0 || crc > 0xffffffffL)
throw new IllegalArgumentException ();
this.crc = crc;
}
@ -115,7 +115,7 @@ public class ZipEntry implements ZipConstants
public void setSize (long size)
{
if (size < 0 || size > 0xffffffff)
if (size < 0 || size > 0xffffffffL)
throw new IllegalArgumentException ();
this.size = size;
}