]> source.dussan.org Git - poi.git/commitdiff
Fix #44824 - Avoid an infinite loop when reading some HWPF pictures
authorNick Burch <nick@apache.org>
Tue, 20 May 2008 15:46:54 +0000 (15:46 +0000)
committerNick Burch <nick@apache.org>
Tue, 20 May 2008 15:46:54 +0000 (15:46 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@658287 13f79535-47bb-0310-9956-ffa450edef68

src/documentation/content/xdocs/changes.xml
src/documentation/content/xdocs/status.xml
src/scratchpad/src/org/apache/poi/hwpf/usermodel/Picture.java

index b9ed583d5f9c2882925b76c0f2c8509bd2c4a050..421404a944032f0684c60cb7aa74a4b6a4d09bfd 100644 (file)
@@ -37,6 +37,7 @@
 
                <!-- Don't forget to update status.xml too! -->
         <release version="3.1-final" date="2008-06-??">
+           <action dev="POI-DEVELOPERS" type="fix">44824 - Avoid an infinite loop when reading some HWPF pictures</action>
            <action dev="POI-DEVELOPERS" type="fix">44898 - Correctly handle short last blocks in POIFS</action>
         </release>  
         <release version="3.1-beta2" date="2008-05-26">
index aea0a9f1abb477f4f55197269f9b8135903d9cc2..da781461effe1cd046197ec220628e0d9075a4bb 100644 (file)
@@ -34,6 +34,7 @@
        <!-- Don't forget to update changes.xml too! -->
     <changes>
         <release version="3.1-final" date="2008-06-??">
+           <action dev="POI-DEVELOPERS" type="fix">44824 - Avoid an infinite loop when reading some HWPF pictures</action>
            <action dev="POI-DEVELOPERS" type="fix">44898 - Correctly handle short last blocks in POIFS</action>
         </release>  
         <release version="3.1-beta2" date="2008-05-26">
index e9ee228c12693e1b6934e41dbee937d6f5c38250..473a9331bf3d8b4906799c6224e7d19a85b1e459 100644 (file)
@@ -363,6 +363,7 @@ public class Picture
       do {
         firstByte = _dataStream[pointer];
         secondByte = _dataStream[pointer+1];
+        pointer += 2;
       } while (!(firstByte==(byte)0xFF) && pointer<endOfPicture-1);
 
       if (firstByte==((byte)0xFF) && pointer<endOfPicture-1) {