[Libreoffice-commits] .: sc/source

Caolán McNamara caolan at kemper.freedesktop.org
Tue Mar 27 05:04:47 PDT 2012


 sc/source/filter/xml/XMLStylesExportHelper.cxx |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 1192b227544c87f25a367ebff478cbdc190dad02
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Mar 27 13:03:21 2012 +0100

    Resolves: rhbz#802173 crash in ScRowStyles::GetStyleNameIndex

diff --git a/sc/source/filter/xml/XMLStylesExportHelper.cxx b/sc/source/filter/xml/XMLStylesExportHelper.cxx
index a04c75b..48d9502 100644
--- a/sc/source/filter/xml/XMLStylesExportHelper.cxx
+++ b/sc/source/filter/xml/XMLStylesExportHelper.cxx
@@ -1290,6 +1290,9 @@ void ScRowStyles::AddNewTable(const sal_Int32 nTable, const sal_Int32 nFields)
 sal_Int32 ScRowStyles::GetStyleNameIndex(const sal_Int32 nTable, const sal_Int32 nField)
 {
     OSL_ENSURE(static_cast<size_t>(nTable) < aTables.size(), "wrong table");
+    if (!(static_cast<size_t>(nTable) < aTables.size()))
+        return -1;
+
     if (maCache.hasCache(nTable, nField))
         // Cache hit !
         return maCache.mnStyle;


More information about the Libreoffice-commits mailing list