RFR: JDK-8056934: ZipInputStream does not correctly handle local header data descriptors with the optional signature missing
Xueming Shen
xueming.shen at oracle.com
Mon Sep 1 18:39:37 UTC 2014
On 8/29/14 12:12 PM, Martin Buchholz wrote:
> Hi Xueming and Alan,
>
> I'd like you to do a code review.
>
> https://bugs.openjdk.java.net/browse/JDK-8056934
> http://cr.openjdk.java.net/~martin/webrevs/openjdk9/zip-DataDescriptorSignatureMissing/
> <http://cr.openjdk.java.net/%7Emartin/webrevs/openjdk9/zip-DataDescriptorSignatureMissing/>
>
> This seems like an atypical off-by-one, so I'm not sure how it
> happened, and I have the nagging feeling I'm missing something.
>
> Greg, this java code review contains a python program!
Agreed, it appears to be off-by-1. I don't know how it happened as well.
The code was put in
back to 1.4.2 (4635869) to fix exactly the same issue (a local
descriptors without signature bits).
Obviously we did not put into the regression test for it :-(
The fix looks fine. Though the comment part is a little long:-) It might
be desirable to simply keep
the first part and move it into readEND?
-Sherman
More information about the core-libs-dev
mailing list