[Libreoffice-commits] core.git: writerfilter/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Aug 13 20:13:46 UTC 2018
writerfilter/source/ooxml/OOXMLDocumentImpl.cxx | 6 ++++++
1 file changed, 6 insertions(+)
New commits:
commit 515006ff9a8977b184e806a70eb4d8f3a318886f
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Aug 13 16:41:31 2018 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Aug 13 22:13:24 2018 +0200
ofz#9870 check sequence length before use
Change-Id: I137a9de49c5a73eb5f277dc1519e5e036abba31c
Reviewed-on: https://gerrit.libreoffice.org/58945
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
index 789a8e790963..77b958599966 100644
--- a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
+++ b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
@@ -635,6 +635,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);
More information about the Libreoffice-commits
mailing list