Menu

#24 StackOverflow with VisitEntries

v2.0
closed-fixed
Federico
None
5
2015-09-18
2014-12-23
No

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.

1 Attachments

Discussion

  • Federico

    Federico - 2014-12-24

    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

     
  • Federico

    Federico - 2014-12-24
    • status: open --> accepted
    • assigned_to: Federico
     
  • Pavel Martynov

    Pavel Martynov - 2014-12-24

    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.

     
  • Federico

    Federico - 2014-12-24

    Commited to dev a cyclic reference validation: now, a CorruptedFileException will be thrown and may be catch for more specific error reporting.

     
  • Federico

    Federico - 2015-09-18
    • status: accepted --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB