[PR] Fix resource leak in ZipSecureFile constructors and corre ct path logging in ZipPackage [poi]
kali834x (via GitHub) <[email protected]>
| Newsgroups | gmane.comp.jakarta.poi.devel |
|---|---|
| Message-ID | <[email protected]> |
kali834x opened a new pull request, #1123:
URL: https://github.com/apache/poi/pull/1123
This PR fixes two issues in the `poi-ooxml` module:
1. Prevents a file descriptor leak in `ZipSecureFile` when `validateEntryNames()` fails during construction by ensuring the opened ZIP file is properly closed on initialization failure.
2. Corrects the warning log in `ZipPackage.closeImpl()` to report the actual temporary file path instead of the target document path when temporary file deletion fails.
Verification
* Added a regression test covering invalid ZIP archives with duplicate entry names and verifying proper resource cleanup.
* All unit tests pass successfully.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]