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

Lance Andersen lancea at openjdk.org
Mon Feb 26 15:35:17 UTC 2024


On Sat, 24 Feb 2024 14:56:01 GMT, Lance Andersen <lancea at openjdk.org> wrote:

> Please review this PR which addresses the handling of invalid UTF-8 byte sequences in the entry name of a LOC file header and a Zip file comment which is returned via ZipFile::getComment.
> 
> As part of the change, `ZipFile::getComment` will now return `null` if an invalid UTF-8 byte sequence is encountered while converting the byte array to a String.  The CSR for this change has also been approved.
> 
> Mach5 tiers 1-3 are clean with this change.

This pull request has now been integrated.

Changeset: 20c71cea
Author:    Lance Andersen <lancea at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/20c71ceacdcb791f5b70cda456bdc47bdd9acf6c
Stats:     289 lines in 3 files changed: 176 ins; 16 del; 97 mod

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

Reviewed-by: jpai, alanb

-------------

PR: https://git.openjdk.org/jdk/pull/17995


More information about the core-libs-dev mailing list