https://bz.apache.org/bugzilla/show_bug.cgi?id=60670
Bug ID: 60670 Summary: Fails to create document nodes in MSI files larger than 2 GB Product: POI Version: 3.15-FINAL Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P2 Component: POIFS Assignee: dev@poi.apache.org Reporter: marcus.lundb...@primekey.se Target Milestone: --- I have generated 2 MSI files 3 GB in size (one with a single large document entry and one with three smaller 1 GB entries). Trying to add an additional document entry in the file system, I get: Caused by: java.lang.IllegalArgumentException: Negative position at sun.nio.ch.FileChannelImpl.write(FileChannelImpl.java:755) [rt.jar:1.8.0_121] at org.apache.poi.poifs.nio.FileBackedDataSource.write(FileBackedDataSource.java:120) [poi-3.15.jar:3.15] at org.apache.poi.poifs.filesystem.NPOIFSFileSystem.createBlockIfNeeded(NPOIFSFileSystem.java:505) [poi-3.15.jar:3.15] at org.apache.poi.poifs.filesystem.NPOIFSStream$StreamBlockByteBuffer.createBlockIfNeeded(NPOIFSStream.java:226) [poi-3.15.jar:3.15] at org.apache.poi.poifs.filesystem.NPOIFSStream$StreamBlockByteBuffer.write(NPOIFSStream.java:246) [poi-3.15.jar:3.15] at org.apache.poi.poifs.filesystem.NPOIFSDocument.store(NPOIFSDocument.java:143) [poi-3.15.jar:3.15] at org.apache.poi.poifs.filesystem.NPOIFSDocument.<init>(NPOIFSDocument.java:84) [poi-3.15.jar:3.15] at org.apache.poi.poifs.filesystem.DirectoryNode.createDocument(DirectoryNode.java:422) [poi-3.15.jar:3.15] at org.apache.poi.poifs.filesystem.NPOIFSFileSystem.createDocument(NPOIFSFileSystem.java:689) [poi-3.15.jar:3.15] at org.signserver.module.msauthcode.signer.MSAuthCodeSigner.signMSI(MSAuthCodeSigner.java:570) [SignServer-Module-MSAuthCode-4.1.0-SNAPSHOT.jar:] I think the culprit here is the prevBlock and nextBlock index "pointers" in StreamBlockByteBuffer being ints causing an overflow. -- 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