[Libreoffice-commits] .: 2 commits - sw/qa sw/source

Caolán McNamara caolan at kemper.freedesktop.org
Fri Mar 4 08:59:19 PST 2011


 sw/qa/core/CVE/CVE-2009-3301-1.doc |binary
 sw/qa/core/filters-test.cxx        |    5 +++++
 sw/source/filter/ww8/ww8par2.cxx   |    2 +-
 3 files changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 50dab7d6469ce6fb87c44eaa56e6d3abccaa7c73
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Mar 4 16:58:54 2011 +0000

    add regression test for CVE-2009-3301

diff --git a/sw/qa/core/CVE/CVE-2009-3301-1.doc b/sw/qa/core/CVE/CVE-2009-3301-1.doc
new file mode 100644
index 0000000..8f1c2de
Binary files /dev/null and b/sw/qa/core/CVE/CVE-2009-3301-1.doc differ
diff --git a/sw/qa/core/filters-test.cxx b/sw/qa/core/filters-test.cxx
index cb13149..f690854 100644
--- a/sw/qa/core/filters-test.cxx
+++ b/sw/qa/core/filters-test.cxx
@@ -146,6 +146,11 @@ void FiltersTest::testCVEs()
         m_aPWDURL + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/CVE/CVE-2009-0201-1.doc")));
     CPPUNIT_ASSERT_MESSAGE("CVE-2009-0201 regression", bResult == true);
 
+    bResult = testLoad(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MS Word 97")),
+        rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CWW8")),
+        m_aPWDURL + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/CVE/CVE-2009-3301-1.doc")));
+    CPPUNIT_ASSERT_MESSAGE("CVE-2009-3301 regression", bResult == true);
+
     bResult = testLoad(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Rich Text Format")),
         rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RTF")),
         m_aPWDURL + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/CVE/CVE-2010-3451-1.rtf")));
commit 5e22a2725512f7c030f629aff232036e992db1ed
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Mar 4 16:58:21 2011 +0000

    make this more robust

diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index e023656..ae11ff5 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -3367,7 +3367,7 @@ USHORT WW8TabDesc::GetLogicalWWCol() const // returns number of col as INDICATED
     USHORT nCol = 0;
     if( pActBand && pActBand->pTCs)
     {
-        for( USHORT iCol = 1; iCol <= nAktCol; ++iCol )
+        for( USHORT iCol = 1; iCol <= nAktCol && iCol <= pActBand->nWwCols; ++iCol )
         {
             if( !pActBand->pTCs[ iCol-1 ].bMerged )
                 ++nCol;


More information about the Libreoffice-commits mailing list