[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - 6 commits - basctl/source connectivity/source sfx2/source translations vcl/source writerfilter/source

Caolán McNamara caolanm at redhat.com
Tue Sep 16 07:10:06 PDT 2014


 basctl/source/basicide/moduldl2.cxx                      |    2 -
 connectivity/source/drivers/file/FPreparedStatement.cxx  |    2 -
 sfx2/source/appl/appbaslib.cxx                           |   12 +++++-----
 translations                                             |    2 -
 vcl/source/gdi/pdfwriter_impl.cxx                        |   18 +++++++++++----
 writerfilter/source/dmapper/DomainMapperTableManager.cxx |    2 -
 6 files changed, 24 insertions(+), 14 deletions(-)

New commits:
commit 6da201e1cb5fc1cb9d0f3c27270f98fd2eb03eef
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Sep 15 16:53:43 2014 +0100

    Resolves: fdo#66496 don't crash on loading specific .docx
    
    Change-Id: I4db5dfeb0ce1494039a051f552ce3f69b2b5dae3
    (cherry picked from commit 48a679cbc5775a7a033dfe494c2a0a513aba9b1f)
    Reviewed-on: https://gerrit.libreoffice.org/11459
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
index 121ea21..22c7a62 100644
--- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
@@ -515,7 +515,7 @@ void DomainMapperTableManager::endLevel( )
         oCurrentWidth.reset(m_aCellWidths.back()->back());
     m_aCellWidths.pop_back( );
     // And push it back to the right level.
-    if (oCurrentWidth)
+    if (oCurrentWidth && !m_aCellWidths.empty() && !m_aCellWidths.back()->empty())
         m_aCellWidths.back()->push_back(*oCurrentWidth);
 
     m_nCell.pop_back( );
commit 62123bf21c4c56cc3fd6b941f10deecd3c9fe5c9
Author: Andras Timar <andras.timar at collabora.com>
Date:   Tue Sep 16 08:49:16 2014 +0200

    Updated core
    Project: translations  7f56743634e9f5c271a0feb83bc7efa9a12367ad

diff --git a/translations b/translations
index f420344..7f56743 160000
--- a/translations
+++ b/translations
@@ -1 +1 @@
-Subproject commit f4203447b3707ebf5338530074831420cc2d9234
+Subproject commit 7f56743634e9f5c271a0feb83bc7efa9a12367ad
commit b702da98e55040dd5e9a1a336b65e5fc75e43b76
Author: Michael Stahl <mstahl at redhat.com>
Date:   Fri Sep 12 17:59:49 2014 +0200

    STL assert in connectivity::file::OPreparedStatement::checkAndResizeParameters
    
    Change-Id: I48f4ceaf1d01d449eba169534f6512f9aadca886
    (cherry picked from commit 7ce8ba33f38671d7cae8b0e759c38b4a8668488a)
    Reviewed-on: https://gerrit.libreoffice.org/11424
    Reviewed-by: Lionel Elie Mamane <lionel at mamane.lu>
    Tested-by: Lionel Elie Mamane <lionel at mamane.lu>

diff --git a/connectivity/source/drivers/file/FPreparedStatement.cxx b/connectivity/source/drivers/file/FPreparedStatement.cxx
index 81ac7a9..be91ac3 100644
--- a/connectivity/source/drivers/file/FPreparedStatement.cxx
+++ b/connectivity/source/drivers/file/FPreparedStatement.cxx
@@ -412,7 +412,7 @@ void OPreparedStatement::checkAndResizeParameters(sal_Int32 parameterIndex)
     {
         sal_Int32 i = m_aParameterRow->get().size();
         (m_aParameterRow->get()).resize(parameterIndex+1);
-        for ( ;i <= parameterIndex+1; ++i )
+        for ( ; i <= parameterIndex; ++i)
         {
             if ( !(m_aParameterRow->get())[i].is() )
                 (m_aParameterRow->get())[i] = new ORowSetValueDecorator;
commit 789d346675f788ce3bfd091bcc96b2ff7ca588de
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Sep 15 14:58:32 2014 +0100

    Resolves: fdo#81635 crash after 3rd call to ApplicationScriptLibraryContainer
    
    in PackageImpl::processPackage_
    
    xComponentContext->getServiceManager()->createInstanceWithContext(
                        "com.sun.star.script.ApplicationScriptLibraryContainer"
    
    does not increment the refcount, so on leaving the method the refcount
    is decremented by 1, because on the first enter the refcount happens to
    be three, then if the extension has more than 3 items in it the refcount
    hits 0 here and falls over
    
    some of fdo#79301, fdo#70607, fdo#66706 might be dups of this
    
    regression from 306efefe22e02248eff14f8be2cef68d75d26e55 I believe
    
    (cherry picked from commit 9128507579246b1559b0bc195d7e9f89541cbbbf)
    
    Conflicts:
    	sfx2/source/appl/appbaslib.cxx
    
    Change-Id: I3da50693fe656b68c5555b641d9b32246c8fc208
    Reviewed-on: https://gerrit.libreoffice.org/11457
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
    Tested-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/sfx2/source/appl/appbaslib.cxx b/sfx2/source/appl/appbaslib.cxx
index d22dc48..4e0c938 100644
--- a/sfx2/source/appl/appbaslib.cxx
+++ b/sfx2/source/appl/appbaslib.cxx
@@ -152,28 +152,28 @@ bool SfxBasicManagerHolder::LegacyPsswdBinaryLimitExceeded( Sequence< OUString >
     return true;
 }
 
-
 // Service for application library container
-
 extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
 com_sun_star_comp_sfx2_ApplicationDialogLibraryContainer_get_implementation(
     css::uno::XComponentContext *,
     css::uno::Sequence<css::uno::Any> const &)
 {
     SFX_APP()->GetBasicManager();
-    return SFX_APP()->GetDialogContainer();
+    css::uno::XInterface* pRet = SFX_APP()->GetDialogContainer();
+    pRet->acquire();
+    return pRet;
 }
 
-
 // Service for application library container
-
 extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
 com_sun_star_comp_sfx2_ApplicationScriptLibraryContainer_get_implementation(
     css::uno::XComponentContext *,
     css::uno::Sequence<css::uno::Any> const &)
 {
     SFX_APP()->GetBasicManager();
-    return SFX_APP()->GetBasicContainer();
+    css::uno::XInterface* pRet = SFX_APP()->GetBasicContainer();
+    pRet->acquire();
+    return pRet;
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 64a89bee8c3bd74d789f50256d2528d9b5f4f736
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Sep 14 16:20:12 2014 +0100

    Resolves: fdo#81039 crash on adding new macro library
    
    regression from
    
    commit bf28399df0b73364b12309032e4a8b571389c2cf
    Date:   Fri Feb 7 15:54:45 2014 +0100
        auto_ptr -> heap_ptr
    
    Change-Id: Ib54c708cbdcb97a7489df4a1b3a7e9367f81ff6b
    (cherry picked from commit a88b2d841856026ea1a0539d670e07fafd296c6e)
    Reviewed-on: https://gerrit.libreoffice.org/11447
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
    Tested-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx
index 7c6cca8..598a170 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -1517,7 +1517,7 @@ void createLibImpl( Window* pWin, const ScriptDocument& rDocument,
 
                     if( pNewLibEntry )
                     {
-                        o3tl::heap_ptr<Entry>(new Entry(OBJ_TYPE_MODULE));
+                        e.reset(new Entry(OBJ_TYPE_MODULE));
                         SvTreeListEntry* pEntry_ = pBasicBox->AddEntry(
                             aModName,
                             Image( IDEResId( RID_IMG_MODULE ) ),
commit 0442fd0936be714284feb8d36d3389a7ffcb87c8
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Fri Sep 12 14:09:34 2014 +0100

    fdo#66701 - don't double destroy the HASH when PDF signing.
    
    Accidentally introduced in d73c039fa it seems.
    
    Change-Id: I846314ebca3a24520492887d4d9027f812cfb32f
    Reviewed-on: https://gerrit.libreoffice.org/11455
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 3e083e2..2f44dd5 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -5945,6 +5945,17 @@ char *PDFSigningPKCS7PasswordCallback(PK11SlotInfo * /*slot*/, PRBool /*retry*/,
     return (char *)arg;
 }
 
+namespace {
+    class HashContextScope {
+        HASHContext *mpPtr;
+    public:
+        HashContextScope(HASHContext *pPtr) : mpPtr(pPtr) {}
+        ~HashContextScope() { clear(); }
+        void clear() { if (mpPtr) { HASH_Destroy(mpPtr); } mpPtr = NULL; }
+        HASHContext *get() { return mpPtr; }
+    };
+}
+
 bool PDFWriterImpl::finalizeSignature()
 {
 
@@ -5994,9 +6005,8 @@ bool PDFWriterImpl::finalizeSignature()
     // Prepare buffer and calculate PDF file digest
     CHECK_RETURN( (osl_File_E_None == osl_setFilePos( m_aFile, osl_Pos_Absolut, 0) ) );
 
-    boost::scoped_ptr<HASHContext> hc(HASH_Create(HASH_AlgSHA1));
-
-    if (!hc)
+    HashContextScope hc(HASH_Create(HASH_AlgSHA1));
+    if (!hc.get())
     {
         SAL_WARN("vcl.gdi", "PDF Signing: SHA1 HASH_Create failed!");
         return false;
@@ -6027,7 +6037,7 @@ bool PDFWriterImpl::finalizeSignature()
     unsigned char hash[SHA1_LENGTH];
     digest.data = hash;
     HASH_End(hc.get(), digest.data, &digest.len, SHA1_LENGTH);
-    HASH_Destroy(hc.get());
+    hc.clear();
 
     const char *pass = OUStringToOString( m_aContext.SignPassword, RTL_TEXTENCODING_UTF8 ).getStr();
 


More information about the Libreoffice-commits mailing list