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

Double Dispose() of ZipWritingStream #294

Closed
aienabled opened this issue Sep 8, 2017 · 3 comments
Closed

Double Dispose() of ZipWritingStream #294

aienabled opened this issue Sep 8, 2017 · 3 comments

Comments

@aienabled
Copy link
Contributor

Hello!

I've noticed that ZipWritingStream on Dispose method call will produce a new ZipEntry.
But it doesn't have protection against subsequent Dispose call. For example:

using (var stream = zipWriter.WriteToStream(FileNameHeader, new ZipWriterEntryOptions()))
using (var streamWriter = new StreamWriter(stream))
{
   ...
}

it will call dispose for ZipWritingStream two times and produce two zip entries in the archive.
I didn't checked it for other streams (non-zip) but they also could be affected by this issue.

Regards!

@adamhathcock
Copy link
Owner

Good find. Any chance for a pull request? :)

@aienabled
Copy link
Contributor Author

Sure #295

@adamhathcock
Copy link
Owner

Thanks!

@adamhathcock adamhathcock added this to the 0.19 milestone Sep 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants