70 bytes file causes Aspose to consume over 4GB of memory (html style tag)

Our process crashed on a call to Aspose, after analyzing a certain customer file.
This short code causes Aspose.Cells to consume over 4GB of memory and crash:

var bytes = Encoding.ASCII.GetBytes(
           "<html><body><table style=\"width:20pt'u6:str\"></table></body></html>"
);
using (var mem = new MemoryStream())
{
    mem.Write(bytes, 0, bytes.Length);
    mem.Flush();
    mem.Seek(0, SeekOrigin.Begin);
    new Aspose.Cells.Workbook(mem);
}

I am not sure how the customer generated this specific file. The Generator meta tag in the original file indicated that it was generated by Microsoft Excel 10.

I would like Aspose to either report an error on such files (if they are invalid) or process them successfully. The customer’s file was named something.xls. Excel successfully rendered the file after displaying a warning about unexpected format.

@User6572,
We have reproduced the issue and logged it in our database for further investigation. You will be notified here once any update is ready for sharing.

This issue is logged as:
CELLSNET-47916 - HTML style tag consumes 4Gb memory and crashes while loading into workbook

1 Like

@User6572,

We are pleased to inform you that your issue has been resolved now as you posted the issue in paid support. You will soon get the fix in your paid support forum thread.

Let us know if we can be of any further help.

1 Like

The issues you have found earlier (filed as CELLSNET-47916) have been fixed in this update. This message was posted using Bugs notification tool by simon.zhao