[Libreoffice-commits] core.git: writerfilter/qa writerfilter/source

Caolán McNamara caolanm at redhat.com
Thu Jul 28 13:00:58 UTC 2016


 writerfilter/qa/cppunittests/rtftok/data/pass/popstate-1.rtf |binary
 writerfilter/source/rtftok/rtfdocumentimpl.cxx               |    2 ++
 2 files changed, 2 insertions(+)

New commits:
commit 5de2d02806669812d43e7f23db58ab7a16373ce6
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jul 28 13:58:33 2016 +0100

    fftester: empty states stack
    
    Change-Id: I05dfffced9a8677650a46b43f65a29e9b21c5524

diff --git a/writerfilter/qa/cppunittests/rtftok/data/pass/popstate-1.rtf b/writerfilter/qa/cppunittests/rtftok/data/pass/popstate-1.rtf
new file mode 100644
index 0000000..0418917
Binary files /dev/null and b/writerfilter/qa/cppunittests/rtftok/data/pass/popstate-1.rtf differ
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 45be8a6..b7bea75 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -1872,6 +1872,8 @@ RTFError RTFDocumentImpl::popState()
     //                         ", dest state: " << m_aStates.top().eDestination);
 
     checkUnicode(/*bUnicode =*/ true, /*bHex =*/ true);
+    if (m_aStates.empty())
+        return RTFError::GROUP_UNDER;
     RTFParserState aState(m_aStates.top());
     m_bWasInFrame = aState.aFrame.inFrame();
 


More information about the Libreoffice-commits mailing list