RFR: 8340553: ZipEntry field validation does not take into account the size of a CEN header [v2]
Lance Andersen
lancea at openjdk.org
Thu Oct 17 10:44:52 UTC 2024
On Thu, 17 Oct 2024 06:50:36 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:
>> Lance Andersen has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Add back missing putNextEntry call
>
> test/jdk/java/util/zip/ZipOutputStream/ZipOutputStreamMaxCenHdrTest.java line 171:
>
>> 169: try (ZipOutputStream zos = new ZipOutputStream(
>> 170: new BufferedOutputStream(Files.newOutputStream(ZIP_FILE)))) {
>> 171: if (expectZipException) {
>
> Hello Lance, with this change, it looks like this now misses calling the `zos.putNextEntry(zipEntry)` when `expectZipException` is `false`. Is that an oversight?
Yes, an oversight as sometimes you see what you want to see.
added a call to `zos.putNextEntry(zipEntry) `when when `expectZipException` is `false`
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21544#discussion_r1804534470
More information about the core-libs-dev
mailing list