NPOI Version
2.8.0 latest nuget; reproduced on main
File Type
Upload the Excel File
hang_readfully.zip
Reproduce Steps
using NPOI.SS.UserModel;
using var fs = File.OpenRead("hang_readfully.xls");
var wb = WorkbookFactory.Create(fs);
Issue Description
A malformed .xls (OLE2 compound file) passed to WorkbookFactory.Create(Stream) can put NPOI into an unterminating loop that pins a CPU core indefinitely. The loop never returns, so a caller cannot recover by catching an exception - the only options are to abandon the thread or kill the process.
NPOI Version
2.8.0 latest nuget; reproduced on main
File Type
Upload the Excel File
hang_readfully.zip
Reproduce Steps
Issue Description
A malformed
.xls(OLE2 compound file) passed toWorkbookFactory.Create(Stream)can put NPOI into an unterminating loop that pins a CPU core indefinitely. The loop never returns, so a caller cannot recover by catching an exception - the only options are to abandon the thread or kill the process.