This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

libgcj/4728: java.util.zip.GZIPOutputStream.write(int) doesn't update CRC



>Number:         4728
>Category:       libgcj
>Synopsis:       java.util.zip.GZIPOutputStream.write(int) doesn't update CRC
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Oct 29 03:46:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Roman Kagan
>Release:        gcc-3.0.2
>Organization:
>Environment:
any
>Description:
Writing to java.util.zip.GZIPOutputStream using write(int)
method results in an invalid GZIP file with a wrong CRC.
>How-To-Repeat:

>Fix:
The problem is due to that write(int) in GZIPOutputStream
is inherited from java.util.zip.DeflaterOutpuStream (like
in Sun's JDK), however (unlike Sun's) it doesn't internally
use write(byte[], int, int) which is overridden in
GZIPOutputStream to update the CRC.
So one has to either override also write(void) in
GZIPOutputStream or modify write(void) in
DeflaterOutputStream.
>Release-Note:
>Audit-Trail:
>Unformatted:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]