Hi all,

Could you review the attached patch (sign it off, and so on)? It fixes a
crash when reading some malformed ODT files. It would be great to have
that one in 3.4.

Thanks,

-- 
Cédric Bosdonnat
LibreOffice hacker
http://documentfoundation.org
OOo Eclipse Integration developer
http://cedric.bosdonnat.free.fr
>From 176fd35ceff616574393130660ff77cbfd3049bd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= <cedric.bosdonnat....@free.fr>
Date: Wed, 18 May 2011 18:08:02 +0200
Subject: [PATCH] fdo#34997: fixed crash when reading malformed fieldmark tags in ODT

---
 xmloff/source/text/txtimp.cxx |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx
index 1c1e90f..5112a5a 100644
--- a/xmloff/source/text/txtimp.cxx
+++ b/xmloff/source/text/txtimp.cxx
@@ -2682,7 +2682,8 @@ void XMLTextImportHelper::pushFieldCtx( ::rtl::OUString name, ::rtl::OUString ty
 
 void XMLTextImportHelper::popFieldCtx()
 {
-    m_pImpl->m_FieldStack.pop();
+    if ( !m_pImpl->m_FieldStack.empty() )
+        m_pImpl->m_FieldStack.pop();
 }
 
 void XMLTextImportHelper::addFieldParam( ::rtl::OUString name, ::rtl::OUString value )
-- 
1.7.3.4

_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to