diff options
author | Nick Burch <nick@apache.org> | 2015-06-28 18:53:21 +0000 |
---|---|---|
committer | Nick Burch <nick@apache.org> | 2015-06-28 18:53:21 +0000 |
commit | c3c7ce3c85bd80be2e71a8a6b2556665a0f9e683 (patch) | |
tree | 4dce8620b2717187b89ad6af01f344a64061a85a /src/java | |
parent | 5c5bafacd293ce8d3538857704f5d77eb3b455e7 (diff) | |
download | poi-c3c7ce3c85bd80be2e71a8a6b2556665a0f9e683.tar.gz poi-c3c7ce3c85bd80be2e71a8a6b2556665a0f9e683.zip |
Put the properties table at block 0, with the first BAT at block 1, to hopefully solve #58061
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1688038 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java')
-rw-r--r-- | src/java/org/apache/poi/poifs/filesystem/NPOIFSFileSystem.java | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/java/org/apache/poi/poifs/filesystem/NPOIFSFileSystem.java b/src/java/org/apache/poi/poifs/filesystem/NPOIFSFileSystem.java index bb5b3a50ed..f7e19137a6 100644 --- a/src/java/org/apache/poi/poifs/filesystem/NPOIFSFileSystem.java +++ b/src/java/org/apache/poi/poifs/filesystem/NPOIFSFileSystem.java @@ -115,17 +115,18 @@ public class NPOIFSFileSystem extends BlockStore { this(true); - // Mark us as having a single empty BAT at offset 0 + // Reserve block 0 for the start of the Properties Table + // Create a single empty BAT, at pop that at offset 1 _header.setBATCount(1); - _header.setBATArray(new int[] { 0 }); + _header.setBATArray(new int[] { 1 }); BATBlock bb = BATBlock.createEmptyBATBlock(bigBlockSize, false); - bb.setOurBlockIndex(0); + bb.setOurBlockIndex(1); _bat_blocks.add(bb); - setNextBlock(0, POIFSConstants.FAT_SECTOR_BLOCK); - setNextBlock(1, POIFSConstants.END_OF_CHAIN); + setNextBlock(0, POIFSConstants.END_OF_CHAIN); + setNextBlock(1, POIFSConstants.FAT_SECTOR_BLOCK); - _property_table.setStartBlock(POIFSConstants.END_OF_CHAIN); + _property_table.setStartBlock(0); } /** |