Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
Checking mergeability… Don't worry, you can still create the pull request.
  • 1 commit
  • 2 files changed
  • 0 commit comments
  • 1 contributor
Commits on Nov 18, 2011
@Gagravarr Gagravarr Patch from bug #51566 - HSLF fix for finishing parsing the picture st…
…ream on the first non-valid type

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1183654 13f79535-47bb-0310-9956-ffa450edef68
8d12741
View
1  src/documentation/content/xdocs/status.xml
@@ -34,6 +34,7 @@
<changes>
<release version="3.8-beta5" date="2011-??-??">
+ <action dev="poi-developers" type="fix">51566 - HSLF fix for finishing parsing the picture stream on the first non-valid type</action>
<action dev="poi-developers" type="fix">51974 - Avoid HWPF issue when identifying the picture type</action>
<action dev="poi-developers" type="fix">52035 - Fix signed issue with very large word 6 files</action>
<action dev="poi-developers" type="fix">51949 - Avoid NPE on double close of ZipFileZipEntrySource</action>
View
5 src/scratchpad/src/org/apache/poi/hslf/HSLFSlideShow.java
@@ -355,6 +355,11 @@ private void readPictures() throws IOException {
int imgsize = LittleEndian.getInt(pictstream, pos);
pos += LittleEndian.INT_SIZE;
+ // When parsing the BStoreDelay stream, [MS-ODRAW] says that we
+ // should terminate if the type isn't 0xf007 or 0xf018->0xf117
+ if (!((type == 0xf007) || (type >= 0xf018 && type <= 0xf117)))
+ break;
+
// The image size must be 0 or greater
// (0 is allowed, but odd, since we do wind on by the header each
// time, so we won't get stuck)

No commit comments for this range

Something went wrong with that request. Please try again.