RFR: 8222807: Address iteration with invalid ZIP header entries

Langer, Christoph christoph.langer at sap.com
Mon May 20 06:58:15 UTC 2019


Hi Lance,

I checked the code and it looks good to me.

The comment in the test (line 46) should probably be more like: “Validate that you can iterate a ZIP file with invalid ZIP header entries”.

Best regards
Christoph


From: nio-dev <nio-dev-bounces at openjdk.java.net> On Behalf Of Lance Andersen
Sent: Samstag, 18. Mai 2019 22:59
To: Claes Redestad <claes.redestad at oracle.com>
Cc: nio-dev <nio-dev at openjdk.java.net>
Subject: Re: RFR: 8222807: Address iteration with invalid ZIP header entries

Hi Claes,

Thank you for the feedback.
On May 17, 2019, at 9:14 PM, Claes Redestad <claes.redestad at oracle.com<mailto:claes.redestad at oracle.com>> wrote:

Hi Lance,

since needing to normalize should be very rare in practice it might be
profitable to outline that case, see similar code in
UnixFileSystem::normalize

Per your suggestion, I made the change and it can be found at: http://cr.openjdk.java.net/~lancea/8222807/webrev.01/index.html

Mach5 tier1, tier2 and tier3 runs are clean



You introduced int len = path.length but then use path.length
in most places.

Thank you again.

Best
Lance


/Claes

On 2019-05-18 01:46, Lance Andersen wrote:

Hi all.
Please review the webrev for 8222807.  This deals with ZIP header entries such as “foo//“. resulting in issues walking walking through a ZIP archive.
The webrev can be found at: http://cr.openjdk.java.net/~lancea/8222807/webrev.00/index.html.
I have verified that the mach5 tier1, tier2, and tier3 tests all pass.
Thank you and have a good weekend.
Best
Lance
<http://oracle.com/us/design/oracle-email-sig-198324.gif>
<http://oracle.com/us/design/oracle-email-sig-198324.gif><http://oracle.com/us/design/oracle-email-sig-198324.gif>
<http://oracle.com/us/design/oracle-email-sig-198324.gif>Lance Andersen| Principal Member of Technical Staff | +1.781.442.2037
Oracle Java Engineering
1 Network Drive
Burlington, MA 01803
Lance.Andersen at oracle.com<mailto:Lance.Andersen at oracle.com> <mailto:Lance.Andersen at oracle.com>

[cid:image001.gif at 01D50EEA.1F60C770]<http://oracle.com/us/design/oracle-email-sig-198324.gif>

<http://oracle.com/us/design/oracle-email-sig-198324.gif>Lance Andersen| Principal Member of Technical Staff | +1.781.442.2037
Oracle Java Engineering
1 Network Drive
Burlington, MA 01803
Lance.Andersen at oracle.com<mailto:Lance.Andersen at oracle.com>




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/nio-dev/attachments/20190520/d8e203d6/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 658 bytes
Desc: image001.gif
URL: <https://mail.openjdk.java.net/pipermail/nio-dev/attachments/20190520/d8e203d6/image001.gif>


More information about the nio-dev mailing list