- Timestamp:
- Apr 27, 2004, 8:39:34 PM (22 years ago)
- Location:
- branches/GNU/src/gcc
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
libjava/java/util/zip/GZIPInputStream.java (modified) (3 diffs, 1 prop)
Legend:
- Unmodified
- Added
- Removed
-
branches/GNU/src/gcc
- Property svn:ignore
-
old new 26 26 configure.vr 27 27 configure.vrs 28 28 29 Makefile 29 dir.info30 30 lost+found 31 31 update.out
-
- Property svn:ignore
-
branches/GNU/src/gcc/libjava/java/util/zip/GZIPInputStream.java
-
Property cvs2svn:cvs-rev
changed from
1.1to1.1.1.2
r1390 r1391 1 1 /* GZIPInputStream.java - Input filter for reading gzip file 2 Copyright (C) 1999, 2000 Free Software Foundation, Inc.2 Copyright (C) 1999, 2000 Free Software Foundation, Inc. 3 3 4 4 This file is part of GNU Classpath. … … 142 142 { 143 143 eos = true; 144 int header_crc = read4 (); 144 145 byte[] tmp = new byte[8]; 146 // First copy remaining bytes from inflater input buffer. 147 int avail = inf.getRemaining (); 148 System.arraycopy (this.buf, this.len - avail, tmp, 0, avail); 149 150 // Now read remaining bytes from wrapped input stream. 151 for (int i = avail; i < 8; ++i) 152 { 153 tmp[i] = (byte) eof_read (); 154 } 155 156 int header_crc = read4 (tmp, 0); 145 157 if (crc.getValue() != header_crc) 146 throw new ZipException ("corrupted gzip file ");147 // Read final `ISIZE' field.148 // FIXME: should we check this length?149 read4 ();158 throw new ZipException ("corrupted gzip file"); 159 160 161 ); 150 162 return -1; 151 163 } … … 154 166 } 155 167 156 private final int read4 ( ) throws IOException168 private final int read4 () throws IOException 157 169 { 158 int byte0 = in.read(); 159 int byte1 = in.read(); 160 int byte2 = in.read(); 161 int byte3 = in.read(); 162 if (byte3 < 0) 163 throw new ZipException (".zip archive ended prematurely"); 164 return ((byte3 & 0xFF) << 24) + ((byte2 & 0xFF) << 16) 165 + ((byte1 & 0xFF) << 8) + (byte0 & 0xFF); 170 return (((buf[offset + 3] & 0xFF) << 24) + ((buf[offset + 2] & 0xFF) << 16) 171 + ((buf[offset + 1] & 0xFF) << 8) + (buf[offset] & 0xFF)); 166 172 } 167 173 -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.
