diff options
author | Bryce McKinlay <bryce@albatross.co.nz> | 2000-02-19 02:54:14 +0000 |
---|---|---|
committer | Bryce McKinlay <bryce@gcc.gnu.org> | 2000-02-19 02:54:14 +0000 |
commit | a0e34aaae4e0f4a7bf1760bb8b62a124b578904f (patch) | |
tree | 370862b9e2d9c3ae0f9cd4736814b92aba078d74 /libjava | |
parent | 488d3985f2ab4b8bb4fe09c1e1a3e269b62d133b (diff) | |
download | gcc-a0e34aaae4e0f4a7bf1760bb8b62a124b578904f.zip gcc-a0e34aaae4e0f4a7bf1760bb8b62a124b578904f.tar.gz gcc-a0e34aaae4e0f4a7bf1760bb8b62a124b578904f.tar.bz2 |
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
Diffstat (limited to 'libjava')
-rw-r--r-- | libjava/ChangeLog | 5 | ||||
-rw-r--r-- | libjava/java/util/zip/ZipEntry.java | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index fb2e46a..7ff9c1c 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -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. diff --git a/libjava/java/util/zip/ZipEntry.java b/libjava/java/util/zip/ZipEntry.java index b2a010f..6e22885 100644 --- a/libjava/java/util/zip/ZipEntry.java +++ b/libjava/java/util/zip/ZipEntry.java @@ -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; } |