]> source.dussan.org Git - poi.git/commitdiff
fix 52032 - HWPF - ArrayIndexOutofBoundsException with no stack trace (broken after...
authorSergey Vladimirov <sergey@apache.org>
Sat, 29 Oct 2011 22:34:09 +0000 (22:34 +0000)
committerSergey Vladimirov <sergey@apache.org>
Sat, 29 Oct 2011 22:34:09 +0000 (22:34 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1195060 13f79535-47bb-0310-9956-ffa450edef68

src/documentation/content/xdocs/status.xml
src/scratchpad/src/org/apache/poi/hwpf/model/ListFormatOverrideLevel.java
src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestBugs.java
test-data/document/Bug52032.doc [new file with mode: 0644]

index aa8117feeb92da6b1ab96451e97ce60495c3d50d..bd1d4d89268bbff2ef7576cdab37307cd86d3761 100644 (file)
@@ -34,6 +34,7 @@
 
     <changes>
         <release version="3.8-beta5" date="2011-??-??">
+           <action dev="poi-developers" type="fix">52032 - HWPF - ArrayIndexOutofBoundsException with no stack trace (broken after revision 1178063)</action>
            <action dev="poi-developers" type="add">support for converting pptx files into images with a PPTX2PNG tool</action>
            <action dev="poi-developers" type="add">52050 - Support for the Excel RATE function</action>
            <action dev="poi-developers" type="fix">51566 - HSLF fix for finishing parsing the picture stream on the first non-valid type</action>
index 2cc28b336d6ffcaa06dcd22173d8828c84a29d4b..0acd9d0c3b6907d290d164290f420acee92c48d5 100644 (file)
@@ -34,6 +34,7 @@ public final class ListFormatOverrideLevel
     public ListFormatOverrideLevel( byte[] buf, int offset )
     {
         _base = new LFOLVLBase( buf, offset );
+        offset += LFOLVLBase.getSize();
 
         if ( _base.isFFormatting() )
         {
index 686f29706c4f5e761c4d6429185e82a3f537c634..17e378d26a2d679babbb4138f6fd5e00db44655c 100644 (file)
@@ -719,4 +719,15 @@ public class TestBugs extends TestCase
         HWPFTestDataSamples.writeOutAndReadBack( HWPFTestDataSamples
                 .openSampleFile( "Bug51834.doc" ) );
     }
+    
+    /**
+     * Bug 52032 - [BUG] & [partial-PATCH] HWPF - ArrayIndexOutofBoundsException
+     * with no stack trace (broken after revision 1178063)
+     */
+    public void testBug52032() throws Exception
+    {
+        HWPFTestDataSamples.openSampleFile( "Bug52032.doc" );
+        HWPFTestDataSamples.writeOutAndReadBack( HWPFTestDataSamples
+                .openSampleFile( "Bug52032.doc" ) );
+    }
 }
diff --git a/test-data/document/Bug52032.doc b/test-data/document/Bug52032.doc
new file mode 100644 (file)
index 0000000..c91d240
Binary files /dev/null and b/test-data/document/Bug52032.doc differ