Closed webern closed 6 years ago
Just tried it on my side and it crashes too (see screenshot below). The crash happens inside MiniZip function unzLocateFile, same as with you.
Found it! Apparently sometimes XML_Char_openzip gets called with filename set to NULL. I fixed it so now that function just returns. Please try again with version 0.2.19? For me it works now with your file.
I didn't see this and I think I also found it. I was seeing that, when there is no sharedstrings file, then there is a crash on strlen(NULL), so the fix that I found was:
xlsxio_read.c (1223)
if ((getrelscallbackdata.sharedstringsfile == NULL) || expat_process_zip_file(handle->zip, getrelscallbackdata.sharedstringsfile, shared_strings_callback_find_sharedstringtable_start, NULL, NULL, &sharedstringsdata, &sharedstringsdata.xmlparser) != 0) {
//no shared strings found
sharedstringlist_destroy(sharedstrings);
sharedstrings = NULL;
}
You are also right. My fix catched this case where getrelscallbackdata.sharedstringsfile is NULL further down the line. I will add an additional check to that part of the code too just to be on the safe side.
For me, xlsxio crashes on the attached file. I have a highly customized build, though, so I would be interested to know if you can open this file with xlsxio. (My build is wonky because I'm using xlsxio in a Node.js addon, here.)
sci-bug.xlsx