tafia / calamine

A pure Rust Excel/OpenDocument SpreadSheets file reader: rust on metal sheets
MIT License
1.6k stars 155 forks source link

memory allocation error when reading xls files with merged regions #444

Open bwkam opened 1 week ago

bwkam commented 1 week ago

Hello, I was trying out the new merged regions commits recently, it all works perfectly fine except for XLS files. I'm not sure why. I've managed to create a minimal reproducible sample of the bug. When I run it, it panics with:

2024-06-24T11:19:14.794480Z DEBUG calamine::cfb: load minis    
memory allocation of 2199023255552 bytes failed

This is the sample: https://github.com/bwkam/calamine-bug-sample I checked, and this is also reproducible with v0.25.

Edit: I tried with another XLS file, and it worked fine. I don't know what's wrong with this one. Perhaps its something with the XLSX to XLS converter I used.

Thanks.