poi icon indicating copy to clipboard operation
poi copied to clipboard

Update the number of property blocks in the POIFS header block

Open ebourg opened this issue 2 years ago • 4 comments

This fixes https://bz.apache.org/bugzilla/show_bug.cgi?id=66590

ebourg avatar May 03 '23 07:05 ebourg

Thanks for the changes. Looks good on a brief look.

Can you add a sample .msi-file to directory test-data/poi-fs and a small unit-test which verifies opening it so we verify the intended feature as well?

centic9 avatar May 06 '23 17:05 centic9

I did modify the existing tests to ensure the header is properly updated. I don't think adding an actual msi file will improve the test coverage, it's just a CFB file like any other one.

ebourg avatar May 06 '23 18:05 ebourg

I don't think we should merge this without an MSI test. We have zero test coverage of MSIs.

-1 from me

pjfanning avatar May 06 '23 18:05 pjfanning

I can contribute one for the tests (I've built one for the Jsign tests: https://github.com/ebourg/jsign/blob/master/jsign-core/src/test/resources/minimal.msi), but a msi file is really not different from other formats handled by POIFS, and this issue is mostly related to the correctness of the header information, that's not MSI specific.

ebourg avatar May 06 '23 18:05 ebourg