-
Notifications
You must be signed in to change notification settings - Fork 87
Closed
Labels
Description
I'm trying to parse an Excel document (xls) using the OpenMcdf.Extensions package.
We call AsOLEProperties extension method and eventually, the execution gets stuck in this while loop (https://github.com/ironfede/openmcdf/blob/master/sources/OpenMcdf/CompoundFile.cs#L1493-L1514) :
while (true)
{
if (nextSecID == Sector.ENDOFCHAIN)
break;
Sector ms = new Sector(Sector.MINISECTOR_SIZE, sourceStream);
byte[] temp = new byte[Sector.MINISECTOR_SIZE];
ms.Id = nextSecID;
ms.Type = SectorType.Mini;
miniStreamView.Seek(nextSecID * Sector.MINISECTOR_SIZE, SeekOrigin.Begin);
miniStreamView.Read(ms.GetData(), 0, Sector.MINISECTOR_SIZE);
result.Add(ms);
miniFATView.Seek(nextSecID * 4, SeekOrigin.Begin);
nextSecID = miniFATReader.ReadInt32();
}When the loop is entered, the nextSecID is 27. At the end of the loop the nextSecID is set to 0. And the nextSecID keeps being null as the same data is read on each loop.
Is 0 even a valid value for nextSecID?
Any idea, what to do about this?
The document in question can be opened fine in Excel. Unfortunately, we got it from a customer of ours, so we can't share it.