ironfede / openmcdf

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

Reading 1Table stream in the following file causes ArgumentOutOfRangeException #76

Closed hughbe closed 1 year ago

hughbe commented 3 years ago

image

mime001.doc.zip

Sonic-The-Hedgehog-LNK1123 commented 3 years ago

I don't know if you have realized this, but the file you provided is badly corrupted.

From the programs I tried, the sample application for OpenMCDF was in fact able to read more data from the file than other programs:

Word's "Open and Repair" command was unable to repair the file and reported the same error than opening it normally.

hughbe commented 3 years ago

Yup I am aware! Its just that we shouldn't throw in block copy, but rather validate the file

ironfede commented 1 year ago

Hi @hughbe , as stated in #75 there's a NoValidation option that allows to be set in order to "try" to get data from corrupted files. If it's blanked out, OpenMcdf should throw a CFCorruptedFileException in order to stop before operating on data. Thank you and sorry for delayed responses, Best Regards Federico