[Libreoffice-commits] .: Branch 'libreoffice-3-5' - writerfilter/source

Petr Mladek pmladek at kemper.freedesktop.org
Mon Jul 30 06:02:49 PDT 2012


 writerfilter/source/dmapper/DomainMapper_Impl.cxx |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 366a6189f2873f06f9e91be28bc78c95f749f839
Author: David Tardon <dtardon at redhat.com>
Date:   Mon May 14 14:42:22 2012 +0200

    do not crash when opening rtf file with unclosed field group
    
    It still fails to load the file (General input/output error), because
    RTFDocumentImpl::resolve() throws io::UnexpectedEOFException, but that
    is a bit better than a crash .-)
    
    Example of such a file can be found in fdo#49666 or rhbz#819304 .
    
    Change-Id: I I1e575bf8e3194afe063297a4daf3e98eaaa510cc
    Signed-off-by: Petr Mladek <pmladek at suse.cz>

diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 0974b84..6aaa144 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -3133,6 +3133,9 @@ void DomainMapper_Impl::PopFieldContext()
     dmapper_logger->element("popFieldContext");
 #endif
 
+    if (m_aFieldStack.empty())
+        return;
+
     FieldContextPtr pContext = m_aFieldStack.top();
     OSL_ENSURE( pContext.get(), "no field context available");
     if( pContext.get() )


More information about the Libreoffice-commits mailing list