Bug: 100% CPU when opening this docx

Hi,

Some DOCX files make Aspose.Words use 100% CPU (making our server unreachable).
This can be reproduced with the latest version of Aspose.Words (22.1.0)

Simply calling the constructor is enough to make this happen:

using Aspose.Words;
using System.IO;

namespace HangTest
{
    internal class Program
    {
        static void Main(string[] args)
        {
            using (var stream = File.OpenRead("obfuscated.docx"))
            {
                var document = new Document(stream);
            }
        }
    }
}

The problem is caused by a problem in the DOCX. This should of course never result in a 100% CPU endless loop. MS Word will open de DOCX without problem.

Tip: the problem in the DOCX is a circular reference in ‘word/styles.xml’ (inside the docx)
image.png (15.6 KB)

DOCX that will go wrong:
obfuscated.docx (55.5 KB)

Can you please fix this?

@cornelos Thank you for reporting this problem to us. I have logged it as WORDSNET-23283. We will keep you informed and let you know once it is resolved.

The issues you have found earlier (filed as WORDSNET-23283) have been fixed in this Aspose.Words for .NET 22.3 update also available on NuGet.