ironfede / openmcdf

Microsoft Compound File .net component - pure C# - netstandard 2.0
Mozilla Public License 2.0
297 stars 73 forks source link

Fix invalid cyclic validation when reaching the end of the difatStream #65

Closed scasteran closed 3 years ago

scasteran commented 4 years ago

The HashSet based cyclic sector validation sometimes cares about extra sector ids. This can lead to unexpected exceptions thrown when the last sector is precisely at the end of the difatStream.

This MR moves that validation to only care about sectors that will be used, and adds a unit test to highlight/cover the issue.

scasteran commented 3 years ago

I could check and the current codebase is not affected by this issue anymore. Thank you very much!