From 6899d8253697ffc7d8273938ccb6ccbc6b022706 Mon Sep 17 00:00:00 2001 From: Nick Burch Date: Tue, 20 May 2008 15:46:54 +0000 Subject: [PATCH] Fix #44824 - Avoid an infinite loop when reading some HWPF pictures git-svn-id: https://svn.eu.apache.org/repos/asf/poi/trunk@658287 13f79535-47bb-0310-9956-ffa450edef68 --- src/documentation/content/xdocs/changes.xml | 1 + src/documentation/content/xdocs/status.xml | 1 + src/scratchpad/src/org/apache/poi/hwpf/usermodel/Picture.java | 1 + 3 files changed, 3 insertions(+) diff --git a/src/documentation/content/xdocs/changes.xml b/src/documentation/content/xdocs/changes.xml index b9ed583..421404a 100644 --- a/src/documentation/content/xdocs/changes.xml +++ b/src/documentation/content/xdocs/changes.xml @@ -37,6 +37,7 @@ + 44824 - Avoid an infinite loop when reading some HWPF pictures 44898 - Correctly handle short last blocks in POIFS diff --git a/src/documentation/content/xdocs/status.xml b/src/documentation/content/xdocs/status.xml index aea0a9f..da78146 100644 --- a/src/documentation/content/xdocs/status.xml +++ b/src/documentation/content/xdocs/status.xml @@ -34,6 +34,7 @@ + 44824 - Avoid an infinite loop when reading some HWPF pictures 44898 - Correctly handle short last blocks in POIFS diff --git a/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Picture.java b/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Picture.java index e9ee228..473a933 100644 --- a/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Picture.java +++ b/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Picture.java @@ -363,6 +363,7 @@ public class Picture do { firstByte = _dataStream[pointer]; secondByte = _dataStream[pointer+1]; + pointer += 2; } while (!(firstByte==(byte)0xFF) && pointer