https://bz.apache.org/bugzilla/show_bug.cgi?id=66590
Bug ID: 66590 Summary: Number of blocks used by the property table missing from the file header Product: POI Version: 5.2.3-FINAL Hardware: All OS: All Status: NEW Severity: normal Priority: P2 Component: POIFS Assignee: dev@poi.apache.org Reporter: ebo...@apache.org Target Milestone: --- I'm using POIFS to modify MSI files (for Authenticode signing with Jsign) and for some files the addition of an entry corrupts the file. I've tracked down the issue to the number of blocks used by the property table in the file header (at offset 0x28) which is not handled by POIFS. When the header is parsed the value of this field is ignored, and when the header is saved the actual number of blocks is never written. This is problematic because msiexec.exe relies on this field to parse the content of the MSI files, it won't process the full stream of the property table even if its chain in the allocation table spans over more blocks. When the entry added by the signing process is located on a new block of the property table, the binary tree holding the properties is re-balanced and a part is grafted to the new entry. Since the number of blocks isn't updated in the header this part of the tree becomes unreachable and the file is corrupted. -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org