Don't get out of bonds

Change-Id: Ifd743fe59d468b3d89c95f4963a038068cf34629
This commit is contained in:
Fridrich Štrba
2012-05-25 12:54:14 +02:00
parent feeb57e0a6
commit c7e71b31bd

View File

@@ -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 ));