[Libreoffice-commits] core.git: 3 commits - bin/oss-fuzz-build.sh sc/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Aug 14 11:40:51 UTC 2018


 bin/oss-fuzz-build.sh           |    2 +-
 sc/source/ui/docshell/impex.cxx |   17 ++++++++---------
 2 files changed, 9 insertions(+), 10 deletions(-)

New commits:
commit e33685593f4cf747c93a02eb4b4c980544f790ca
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Aug 14 10:40:37 2018 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Aug 14 13:37:02 2018 +0200

    ofz#7790 InsertMatrixFormula timeout
    
    Change-Id: Ic99e4db85495f7581ff09cbfcc7bf1f57b016709
    Reviewed-on: https://gerrit.libreoffice.org/58972
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index bcb2c39f2720..af2d363998c2 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -97,7 +97,7 @@ enum class SylkVersion
 // Whole document without Undo
 ScImportExport::ScImportExport( ScDocument* p )
     : pDocSh( dynamic_cast< ScDocShell* >(p->GetDocumentShell()) ), pDoc( p ),
-      nSizeLimit( 0 ), nMaxImportRow(!utl::ConfigManager::IsFuzzing() ? MAXROW : 16000),
+      nSizeLimit( 0 ), nMaxImportRow(!utl::ConfigManager::IsFuzzing() ? MAXROW : 4000),
       cSep( '\t' ), cStr( '"' ),
       bFormulas( false ), bIncludeFiltered( true ),
       bAll( true ), bSingle( true ), bUndo( false ),
@@ -113,7 +113,7 @@ ScImportExport::ScImportExport( ScDocument* p )
 ScImportExport::ScImportExport( ScDocument* p, const ScAddress& rPt )
     : pDocSh( dynamic_cast< ScDocShell* >(p->GetDocumentShell()) ), pDoc( p ),
       aRange( rPt ),
-      nSizeLimit( 0 ), nMaxImportRow(!utl::ConfigManager::IsFuzzing() ? MAXROW : 16000),
+      nSizeLimit( 0 ), nMaxImportRow(!utl::ConfigManager::IsFuzzing() ? MAXROW : 4000),
       cSep( '\t' ), cStr( '"' ),
       bFormulas( false ), bIncludeFiltered( true ),
       bAll( false ), bSingle( true ), bUndo( pDocSh != nullptr ),
@@ -130,7 +130,7 @@ ScImportExport::ScImportExport( ScDocument* p, const ScAddress& rPt )
 ScImportExport::ScImportExport( ScDocument* p, const ScRange& r )
     : pDocSh( dynamic_cast<ScDocShell* >(p->GetDocumentShell()) ), pDoc( p ),
       aRange( r ),
-      nSizeLimit( 0 ), nMaxImportRow(!utl::ConfigManager::IsFuzzing() ? MAXROW : SCROWS32K),
+      nSizeLimit( 0 ), nMaxImportRow(!utl::ConfigManager::IsFuzzing() ? MAXROW : 4000),
       cSep( '\t' ), cStr( '"' ),
       bFormulas( false ), bIncludeFiltered( true ),
       bAll( false ), bSingle( false ), bUndo( pDocSh != nullptr ),
@@ -148,7 +148,7 @@ ScImportExport::ScImportExport( ScDocument* p, const ScRange& r )
 // If a View exists, the TabNo of the view will be used.
 ScImportExport::ScImportExport( ScDocument* p, const OUString& rPos )
     : pDocSh( dynamic_cast< ScDocShell* >(p->GetDocumentShell()) ), pDoc( p ),
-      nSizeLimit( 0 ), nMaxImportRow(!utl::ConfigManager::IsFuzzing() ? MAXROW : SCROWS32K),
+      nSizeLimit( 0 ), nMaxImportRow(!utl::ConfigManager::IsFuzzing() ? MAXROW : 4000),
       cSep( '\t' ), cStr( '"' ),
       bFormulas( false ), bIncludeFiltered( true ),
       bAll( false ), bSingle( true ), bUndo( pDocSh != nullptr ),
commit a6c1eab1d1c418b24f0756d96d38f891e690ec86
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Aug 14 10:00:35 2018 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Aug 14 13:36:45 2018 +0200

    mv rather than cp fuzzer
    
    Change-Id: I8166bef1c7786c17f531be807029ba8d609931b3
    Reviewed-on: https://gerrit.libreoffice.org/58971
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/bin/oss-fuzz-build.sh b/bin/oss-fuzz-build.sh
index b8ea876d85dc..a544a5069ff1 100755
--- a/bin/oss-fuzz-build.sh
+++ b/bin/oss-fuzz-build.sh
@@ -27,7 +27,7 @@ head -c -14 services.rdb  > templateservices.rdb
 tail -c +85 ./services/services.rdb >> templateservices.rdb
 for a in *fuzzer; do
     #some minimal fonts required
-    cp $a $OUT
+    mv $a $OUT
     mkdir -p $OUT/$a.fonts
     cp $SRC/49a64f3bcf20a7909ba2751349231d6652ded9cd2840e961b5164d09de3ffa63-opens___.ttf ../share/fonts/truetype/Liberation* $OUT/$a.fonts
     #minimal runtime requirements
commit 6d5a82f04d73f52efc9cb9a81c15087f06f35b5c
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Aug 14 08:57:16 2018 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Aug 14 13:36:25 2018 +0200

    use std::unique_ptr
    
    Change-Id: Ib76d6a82037e36a41cebdf86af9754a51aab213c
    Reviewed-on: https://gerrit.libreoffice.org/58968
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index b28d7522a746..bcb2c39f2720 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -1930,22 +1930,21 @@ bool ScImportExport::Sylk2Doc( SvStream& rStrm )
                              * better GRAM_ENGLISH_XL_R1C1. */
                             const formula::FormulaGrammar::Grammar eGrammar = formula::FormulaGrammar::GRAM_PODF_A1;
                             ScCompiler aComp( pDoc, aPos, eGrammar);
-                            ScTokenArray* pCode = aComp.CompileString( aText );
-                            pDoc->CheckLinkFormulaNeedingCheck( *pCode);
+                            std::unique_ptr<ScTokenArray> xCode(aComp.CompileString(aText)); // ctor/InsertMatrixFormula did copy TokenArray
+                            pDoc->CheckLinkFormulaNeedingCheck(*xCode);
                             if ( ch == 'M' )
                             {
                                 ScMarkData aMark;
                                 aMark.SelectTable( aPos.Tab(), true );
                                 pDoc->InsertMatrixFormula( nCol, nRow, nRefCol,
-                                    nRefRow, aMark, EMPTY_OUSTRING, pCode );
+                                    nRefRow, aMark, EMPTY_OUSTRING, xCode.get() );
                             }
                             else
                             {
                                 ScFormulaCell* pFCell = new ScFormulaCell(
-                                        pDoc, aPos, *pCode, eGrammar, ScMatrixMode::NONE);
+                                        pDoc, aPos, *xCode, eGrammar, ScMatrixMode::NONE);
                                 pDoc->SetFormulaCell(aPos, pFCell);
                             }
-                            delete pCode;   // ctor/InsertMatrixFormula did copy TokenArray
                         }
                         break;
                     }


More information about the Libreoffice-commits mailing list