HI Eirik

On Feb 23, 2023, at 7:43 AM, Eirik Bjørsnøs 
<eir...@gmail.com<mailto:eir...@gmail.com>> wrote:

Hi,

While writing various ZIP related tests, I noticed a discrepancy in the 
treatment of invalid CRC values:

While ZipInputStream rejects invalid CRC values when consuming streams, ZipFile 
and ZipFileSystem do not.

While this is inconsistent, it is perhaps not a bug we want to fix?

I believe it is intentional.  Alan, Martin B, do you recall the history?

In any case, it could perhaps be good to have better test coverage in this 
area. Here's a test which validates the current behaviour of ZIS, ZF and ZFS:

https://github.com/openjdk/jdk/compare/master...eirbjo:jdk:zip-invalid-crc

I will take a look next week

Thank you for your efforts in this area

Best
Lance

Any thoughts?

Thanks,
Eirik.



[cid:E1C4E2F0-ECD0-4C9D-ADB4-B16CA7BCB7FC@home]






Lance Andersen | Principal Member of Technical Staff | +1.781.442.2037
Oracle Java Engineering
1 Network Drive
Burlington, MA 01803
lance.ander...@oracle.com<mailto:lance.ander...@oracle.com>



Reply via email to