StackOverflow with VisitEntries
Structured Storage .net component - pure C#
Brought to you by:
ironfede
Hi!
I have a thumbs.db (maybe broken) with which OpenMCDF fails with StackOverflow exception (tested with 1.5.4 and 2.0 pre-release).
Test code:
using (var cf = new CompoundFile("thumbs.db"))
{
cf.RootStorage.VisitEntries(item => Console.WriteLine(item.Name), recursive: false);
}
Please fix, this very annoying in multiple files processing scenario.
Hi Pavel,
actually file IS broken: I've found that there's a cycle reference between directory item 11 and 13 that leads to the StackOverflowException. The only thing I can do ( and I will do it) is enhancinng validation of files for this corruption case throwing a more specific exception. I've also tested the file with other viewers/applications and all fires "corrupted files" warning or simply crash.
Thank you for your report,
Best Regards,
Federico
Thanks for quick answer!
The problem is so bad that StackOverflow isnt catchable since .net 2.0 and my program just crashes on production.
Also I have test this file with GemBox.CompoundFile library, it fails with StackOverflow too.
Commited to dev a cyclic reference validation: now, a CorruptedFileException will be thrown and may be catch for more specific error reporting.