Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dispose of entry streams returned by ZipFile.GetInputStream #458

Merged
merged 1 commit into from Aug 7, 2020

Conversation

Numpsy
Copy link
Contributor

@Numpsy Numpsy commented May 3, 2020

Another offshoot of #449 - When extracting a zip with FastZip, dispose of the streams returned from ZipFile.GetInputStream().

I certify that I own, and have sufficient rights to contribute, all source code and related material intended to be compiled or integrated with the source code for the SharpZipLib open source product (the "Contribution"). My Contribution is licensed under the MIT License.

@Numpsy Numpsy added the zip Related to ZIP file format label May 3, 2020
@piksel piksel self-requested a review May 27, 2020 21:26
@piksel piksel self-assigned this Jun 23, 2020
@piksel piksel merged commit f593921 into icsharpcode:master Aug 7, 2020
Copy link
Member

@piksel piksel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not actually needed, but Stream is IDisposable, so I guess it's better to comply :3

@Numpsy
Copy link
Contributor Author

Numpsy commented Aug 7, 2020

I thought it best to be 'nice' about tidying it up, as if it's doing AES decryption for the entry, the stream might contain crypto classes that are disposable as well (though I think there are some FxCop warnings about things in there not being disposed)

@Numpsy Numpsy deleted the rw/fastzip/dispose_entry_stream branch August 7, 2020 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
zip Related to ZIP file format
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants