[8u] RFR 8190753: (zipfs): Accessing a large entry (> 2^31 bytes) leads to a negative initial size for ByteArrayOutputStream

Alexey Pavlyutkin apavlyutkin at azul.com
Mon Dec 20 09:00:53 UTC 2021


Hello Andrew,

I rebased the patch to monojdk8u.

The reason for the earlier occurrence of FileRolloverOutputStream is that there is some new code above in 11u. Particularly in 11u EntryOutputStream is being broken apart for the cases of deflating and RAW streaming with introduction of new DeflatingEntryOutputStream class.

The Map objects were fixed to be unmodifiable, accidental delta was eliminated.

The changes are available at

http://cr.openjdk.java.net/~yan/8190753/webrev.01/

I though the changes were already successfully reviewed. Sorry for that

Thank you

Regards,
Alex

-----Original Message-----
From: Andrew Hughes <gnu.andrew at redhat.com> 
Sent: Tuesday, December 14, 2021 6:21 AM
To: Alexey Pavlyutkin <apavlyutkin at azul.com>
Cc: Severin Gehwolf <sgehwolf at redhat.com>; jdk8u-dev at openjdk.java.net
Subject: Re: [8u] RFR 8190753: (zipfs): Accessing a large entry (> 2^31 bytes) leads to a negative initial size for ByteArrayOutputStream

On 20:42 Mon 13 Dec     , Alexey Pavlyutkin wrote:
> Hi Severin!
> 
> I have no idea. I did not do that advisedly. Probably I did them occasionally configuring jcheck tool. Anyway as I understand the changes are to be rebased to monorepo. Should I fix it before rebasing?
>

Please do.

There are some other issues with the patch:

* The placement of FileRolloverOutputStream seems to occur earlier in
  the 8u patch than in the 11u one. Can you confirm it ends up in the
  same or similar place in the file?

* Map.of creates unmodifiable Map instances. The replacement with emptyMap is fine, but the others need to be made unmodifiable. See the examples in jdk/test/sun/security/krb5/auto/KDC.java which was also converted from Map.of usage.

Please don't flag issues for approval with jdk8u-fix-request until they have been satisfactorily reviewed on the list.

> Thanks,
> Alex

Thanks,
--
Andrew :)
Pronouns: he / him or they / them
Senior Free Java Software Engineer
OpenJDK Package Owner
Red Hat, Inc. (http://www.redhat.com)

PGP Key: ed25519/0xCFDA0F9B35964222 (hkp://keys.gnupg.net) Fingerprint = 5132 579D D154 0ED2 3E04  C5A0 CFDA 0F9B 3596 4222


More information about the jdk8u-dev mailing list