[Libreoffice-commits] .: Branch 'feature/mspub' - writerperfect/source
Fridrich Strba
fridrich at kemper.freedesktop.org
Fri May 25 03:55:16 PDT 2012
writerperfect/source/stream/WPXSvStream.cxx | 6 ++++++
1 file changed, 6 insertions(+)
New commits:
commit dce5c6943ba50e7da02394ec834389845bdd582b
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date: Fri May 25 12:54:14 2012 +0200
Don't get out of bonds
Change-Id: Ifd743fe59d468b3d89c95f4963a038068cf34629
diff --git a/writerperfect/source/stream/WPXSvStream.cxx b/writerperfect/source/stream/WPXSvStream.cxx
index 58c0544..d71e155 100644
--- a/writerperfect/source/stream/WPXSvStream.cxx
+++ b/writerperfect/source/stream/WPXSvStream.cxx
@@ -180,6 +180,12 @@ WPXInputStream *WPXSvInputStream::getDocumentOLEStream(const char *name)
return 0;
}
+ // For the while don't return stream in this situation.
+ // Later, given how libcdr's zip stream implementation behaves,
+ // return the first stream in the storage if there is one.
+ if (i >= aElems.size())
+ return 0;
+
mxChildrenStreams.push_back( mxChildrenStorages.back()->OpenSotStream(
aElems[i], STREAM_STD_READ ));
More information about the Libreoffice-commits
mailing list