Hi, there are 2 problems here:
XLS file not being detected by cfb dependency, because it can't handle the partial buffer of 8192 bytes. open here:
|
if let Ok(file) = cfb::CompoundFile::open(Cursor::new(buf)) { |
returns:
kind: InvalidData, error: "Malformed FAT (FAT has 66 entries, but file has only 15 sectors)"
Not sure what's the best solution here, in this doc I found they suggest to look at offset 512 to determine the doc type such as doc/xls/ppt:
https://sceweb.sce.uhcl.edu/abeysekera/itec3831/labs/FILE%20SIGNATURES%20TABLE.pdf
Second problem is that it falls back to MSI, but it has nothing to do with MSI or installers, so perhaps MSI should have a stricter check.
CreditCard.zip