Skip to content

Fix stream/zip leaks and infinite loop in export path#1458

Open
avinxshKD wants to merge 1 commit intoprocessing:mainfrom
avinxshKD:fix/export-stream-leaks
Open

Fix stream/zip leaks and infinite loop in export path#1458
avinxshKD wants to merge 1 commit intoprocessing:mainfrom
avinxshKD:fix/export-stream-leaks

Conversation

@avinxshKD
Copy link
Contributor

Fixes #1451

Four FileInputStream calls, a ZipFile, and the entry InputStream in packClassPathIntoZipFile were all leaking. Also the read loop would spin forever if read() returned -1 on a bad jar. Wrapped everything in try-with-resources and added an EOF break.

@avinxshKD
Copy link
Contributor Author

@catilac was pretty straightforward, let me know if you want anything changed before merging

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Export path leaks streams in java/src/processing/mode/java/JavaBuild.java and can hang on malformed jar entries

1 participant