writerfilter/source/ooxml/OOXMLDocumentImpl.cxx |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit 379bf687d1bbbcab5ee308089c1270dc95b2b410
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Mon Aug 13 16:41:31 2018 +0100
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Tue Aug 21 10:47:29 2018 +0200

    ofz: check sequence length before use
    
    Change-Id: I137a9de49c5a73eb5f277dc1519e5e036abba31c
    Reviewed-on: https://gerrit.libreoffice.org/58947
    Tested-by: Jenkins
    Reviewed-by: Andras Timar <andras.ti...@collabora.com>

diff --git a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx 
b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
index b905d8968a15..578a84465ce7 100644
--- a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
+++ b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
@@ -640,6 +640,12 @@ void OOXMLDocumentImpl::resolveGlossaryStream(Stream & 
/*rStream*/)
               OOXMLStream::Pointer_t gStream;
               uno::Sequence< beans::StringPair > aSeq = aSeqs[j];
               //Follows following aSeq[0] is Id, aSeq[1] is Type, aSeq[2] is 
Target
+              if (aSeq.getLength() < 3)
+              {
+                  SAL_WARN("writerfilter.ooxml", "too short sequence");
+                  continue;
+              }
+
               OUString gId(aSeq[0].Second);
               OUString gType(aSeq[1].Second);
               OUString gTarget(aSeq[2].Second);
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to