From 32ffb44def558f01aa1278514781bfadf39edfdc Mon Sep 17 00:00:00 2001 From: Nick Burch Date: Sat, 15 Oct 2011 12:23:50 +0000 Subject: [PATCH] Apply patch from bug #52035 - Fix signed issue with very large word 6 files git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1183629 13f79535-47bb-0310-9956-ffa450edef68 --- src/documentation/content/xdocs/status.xml | 1 + .../src/org/apache/poi/hwpf/model/OldCHPBinTable.java | 2 +- .../src/org/apache/poi/hwpf/model/OldPAPBinTable.java | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/documentation/content/xdocs/status.xml b/src/documentation/content/xdocs/status.xml index 45c894960..4e29144f8 100644 --- a/src/documentation/content/xdocs/status.xml +++ b/src/documentation/content/xdocs/status.xml @@ -34,6 +34,7 @@ + 52035 - Fix signed issue with very large word 6 files 51949 - Avoid NPE on double close of ZipFileZipEntrySource 51950 - XWPF fix for footnotes not always being present in a document 51963 - Correct AreaReference handling of references containing a sheet name which includes a comma diff --git a/src/scratchpad/src/org/apache/poi/hwpf/model/OldCHPBinTable.java b/src/scratchpad/src/org/apache/poi/hwpf/model/OldCHPBinTable.java index dff5f3d70..4b9038d4f 100644 --- a/src/scratchpad/src/org/apache/poi/hwpf/model/OldCHPBinTable.java +++ b/src/scratchpad/src/org/apache/poi/hwpf/model/OldCHPBinTable.java @@ -53,7 +53,7 @@ public final class OldCHPBinTable extends CHPBinTable { GenericPropertyNode node = binTable.getProperty(x); - int pageNum = LittleEndian.getShort(node.getBytes()); + int pageNum = LittleEndian.getUShort(node.getBytes()); int pageOffset = POIFSConstants.SMALLER_BIG_BLOCK_SIZE * pageNum; CHPFormattedDiskPage cfkp = new CHPFormattedDiskPage(documentStream, diff --git a/src/scratchpad/src/org/apache/poi/hwpf/model/OldPAPBinTable.java b/src/scratchpad/src/org/apache/poi/hwpf/model/OldPAPBinTable.java index 088ca33f2..658e66715 100644 --- a/src/scratchpad/src/org/apache/poi/hwpf/model/OldPAPBinTable.java +++ b/src/scratchpad/src/org/apache/poi/hwpf/model/OldPAPBinTable.java @@ -45,7 +45,7 @@ public final class OldPAPBinTable extends PAPBinTable { GenericPropertyNode node = binTable.getProperty(x); - int pageNum = LittleEndian.getShort(node.getBytes()); + int pageNum = LittleEndian.getUShort(node.getBytes()); int pageOffset = POIFSConstants.SMALLER_BIG_BLOCK_SIZE * pageNum; PAPFormattedDiskPage pfkp = new PAPFormattedDiskPage(documentStream,