Ensure ownership of ZipEntry stream is clear
Open
- Dominant language
- C#
- Stars
- 729
- Forks
- 397
- Avg merge
- 3d 15m
- Merged PRs (30d)
- 149
Description
In SignTool's archive handling (which handles more than Zips!), the ZipEntry contructor is handed a content stream for use in computing the content hash. This stream is then assigned to a member of the ZipEntry if it is seekable, or copied to another stream and then assigned if it is not. There are a number of places where a caller (mostly/all in a ZipData.ReadEntries loop) that reaches the ZipData constructor is passing a stream with a `using`.
Ownership of the passed-in stream needs to be clear. ZipData should own the stream that is passed to it, and any streams that it creates.
Contributor guide
Assessment
This issue has not been assessed yet.