writerperfect/source/stream/WPXSvStream.cxx |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit c7e71b31bd7b042da6aeda80bc92933e91533c1d
Author: Fridrich Å trba <fridrich.st...@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 ));
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to