Skip to content

Conversation

@rm-gh-8
Copy link
Contributor

@rm-gh-8 rm-gh-8 commented Nov 17, 2025

Backporting JDK-8321156: Improve the handling of invalid UTF-8 byte sequences for ZipInputStream::getNextEntry and ZipFile::getComment.

Fixes invalid UTF-8 byte sequence handling in:

  • ZIP entry names within LOC file headers
  • ZIP file comments accessed through ZipFile::getComment

Behavior change: ZipFile::getComment now returns null when invalid UTF-8 sequences are detected during byte-to-String conversion.

Ran GHA Sanity Checks (passed) and related test (passed).


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • JDK-8321156 needs maintainer approval
  • Change requires CSR request JDK-8372026 to be approved

Issues

  • JDK-8321156: Improve the handling of invalid UTF-8 byte sequences for ZipInputStream::getNextEntry and ZipFile::getComment (Bug - P4)
  • JDK-8372026: Improve the handling of invalid UTF-8 byte sequences for ZipInputStream::getNextEntry and ZipFile::getComment (CSR)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk21u-dev.git pull/2480/head:pull/2480
$ git checkout pull/2480

Update a local copy of the PR:
$ git checkout pull/2480
$ git pull https://git.openjdk.org/jdk21u-dev.git pull/2480/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 2480

View PR using the GUI difftool:
$ git pr show -t 2480

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk21u-dev/pull/2480.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 17, 2025

👋 Welcome back rm-gh-8! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Nov 17, 2025

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk bot changed the title Backport 20c71ceacdcb791f5b70cda456bdc47bdd9acf6c 8321156: Improve the handling of invalid UTF-8 byte sequences for ZipInputStream::getNextEntry and ZipFile::getComment Nov 17, 2025
@openjdk
Copy link

openjdk bot commented Nov 17, 2025

This backport pull request has now been updated with issue from the original commit.

@openjdk openjdk bot added backport Port of a pull request already in a different code base clean Identical backport; no merge resolution required labels Nov 17, 2025
@openjdk
Copy link

openjdk bot commented Nov 17, 2025

At least one of the issues associated with this backport has a resolved CSR for a different version. As this means that this backport may also need a CSR, the csr label is being added to this pull request to signal this potential requirement. The command /csr unneeded can be used to remove the label in case a CSR is not needed.

@openjdk openjdk bot added the csr Pull request needs approved CSR before integration label Nov 17, 2025
@rm-gh-8 rm-gh-8 marked this pull request as ready for review November 17, 2025 20:16
@openjdk openjdk bot added the rfr Pull request is ready for review label Nov 17, 2025
@mlbridge
Copy link

mlbridge bot commented Nov 17, 2025

Webrevs

@openjdk openjdk bot removed the clean Identical backport; no merge resolution required label Nov 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Port of a pull request already in a different code base csr Pull request needs approved CSR before integration rfr Pull request is ready for review

Development

Successfully merging this pull request may close these issues.

1 participant