The GitHub Actions job "Java CI with Ant" on poi.git/leak-hslf-dual-storage has 
failed.
Run started by GitHub user pjfanning (triggered by pjfanning).

Head commit for run:
77ce5716dd4b6eaef45122ca989c16cd159aabb6 / PJ Fanning 
<[email protected]>
Close the filesystem if HSLF dual-storage lookup fails

HSLFSlideShowImpl(DirectoryNode, char[]) already closes the underlying
filesystem when parsing fails, so that HSLFSlideShowImpl(String) does not
leak the file handle it opened. That cleanup does not cover
handleDualStorage, which runs in the super(...) argument and so completes
before the constructor body - and its try block - is entered.

handleDualStorage casts the PP97_DUALSTORAGE entry to DirectoryNode. A
malformed file where that entry is a document rather than a directory
fails the cast with a ClassCastException that escapes past the
constructor's catch, leaking the file handle.

Close the filesystem in handleDualStorage itself and rethrow the original
exception. The cast is left as-is so the exception type callers see for a
malformed file does not change.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

Report URL: https://github.com/apache/poi/actions/runs/34117134563

With regards,
GitHub Actions via GitBox


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to