sw/source/core/tox/ToxTextGenerator.cxx |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 090e9ecd0960e6027cfaaf4600e95dc311524143
Author: Tamas Bunth <tamas.bu...@collabora.co.uk>
Date:   Mon Oct 23 20:10:40 2017 +0200

    tdf#113284 Check vector length before use
    
    Change-Id: I52b5e6712ba34de0a73bc45ce2262b211b5ac50e
    Reviewed-on: https://gerrit.libreoffice.org/43725
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Tamás Bunth <btom...@gmail.com>

diff --git a/sw/source/core/tox/ToxTextGenerator.cxx 
b/sw/source/core/tox/ToxTextGenerator.cxx
index c748bdb42041..2aa7f657d82d 100644
--- a/sw/source/core/tox/ToxTextGenerator.cxx
+++ b/sw/source/core/tox/ToxTextGenerator.cxx
@@ -300,6 +300,9 @@ ToxTextGenerator::HandleTextToken(const SwTOXSortTabBase& 
source, SwAttrPool& po
     ToxWhitespaceStripper stripper(source.GetText().sText);
     result.text = stripper.GetStrippedString();
 
+    if( source.aTOXSources.empty() )
+        return result;
+
     const SwTextNode* pSrc = source.aTOXSources.at(0).pNd->GetTextNode();
     if (!pSrc->HasHints()) {
         return result;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to