chart2/source/controller/main/DrawCommandDispatch.cxx |    4 ++--
 reportdesign/source/ui/dlg/Formula.cxx                |    6 +++---
 reportdesign/source/ui/inc/Formula.hxx                |    4 ++--
 sfx2/source/doc/SfxRedactionHelper.cxx                |    4 +---
 4 files changed, 8 insertions(+), 10 deletions(-)

New commits:
commit 784f93b3895fc7e85eec26c3fece12433b3a5ce4
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Wed Jul 17 20:34:35 2019 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Thu Jul 18 09:38:00 2019 +0200

    cid#1448252 Negative array index read
    
    Change-Id: Ia81e2a58e372455531479c98d11a88cd950441df
    Reviewed-on: https://gerrit.libreoffice.org/75808
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>
    Tested-by: Caolán McNamara <caol...@redhat.com>

diff --git a/sfx2/source/doc/SfxRedactionHelper.cxx 
b/sfx2/source/doc/SfxRedactionHelper.cxx
index 310c0374ca35..ff81bdf39292 100644
--- a/sfx2/source/doc/SfxRedactionHelper.cxx
+++ b/sfx2/source/doc/SfxRedactionHelper.cxx
@@ -546,9 +546,7 @@ void 
SfxRedactionHelper::fillSearchOptions(i18nutil::SearchOptions2& rSearchOpt,
     rSearchOpt.Locale = GetAppLanguageTag().getLocale();
     if (pTarget->sType == RedactionTargetType::REDACTION_TARGET_PREDEFINED)
     {
-        sal_Int32 nPredefIndex = pTarget->sContent.getToken(0, ';').toInt32();
-        //sal_Int32 nPredefIndex = sContent.toInt32();
-
+        auto nPredefIndex = pTarget->sContent.getToken(0, ';').toUInt32();
         rSearchOpt.searchString = m_aPredefinedTargets[nPredefIndex];
     }
     else
commit 7fcb5c20310d23a4ede8b0a6e03ba23482792621
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Wed Jul 17 20:36:23 2019 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Thu Jul 18 09:37:45 2019 +0200

    cid#1448236 Use after free
    
    Change-Id: Id7a0ad49a8e73a6b12a0f40c4b8f62b1e1d64356
    Reviewed-on: https://gerrit.libreoffice.org/75810
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>
    Tested-by: Caolán McNamara <caol...@redhat.com>

diff --git a/chart2/source/controller/main/DrawCommandDispatch.cxx 
b/chart2/source/controller/main/DrawCommandDispatch.cxx
index 7a6a07b1ae41..7540d7962eae 100644
--- a/chart2/source/controller/main/DrawCommandDispatch.cxx
+++ b/chart2/source/controller/main/DrawCommandDispatch.cxx
@@ -371,8 +371,8 @@ void DrawCommandDispatch::execute( const OUString& 
rCommand, const Sequence< bea
                         if ( pObj )
                         {
                             SdrPageView* pPageView = 
pDrawViewWrapper->GetSdrPageView();
-                            pDrawViewWrapper->InsertObjectAtView( pObj, 
*pPageView );
-                            
m_pChartController->SetAndApplySelection(Reference<drawing::XShape>(pObj->getUnoShape(),
 uno::UNO_QUERY));
+                            if (pDrawViewWrapper->InsertObjectAtView(pObj, 
*pPageView))
+                                
m_pChartController->SetAndApplySelection(Reference<drawing::XShape>(pObj->getUnoShape(),
 uno::UNO_QUERY));
                             if ( nFeatureId == COMMAND_ID_DRAW_TEXT )
                             {
                                 m_pChartController->StartTextEdit();
commit e2cd1f41b8cb8a27155ce1ddddfe5760f05b7129
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Wed Jul 17 19:54:53 2019 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Thu Jul 18 09:37:28 2019 +0200

    cid#1448383 Resource leak in object
    
    Change-Id: I07af4d48db887c184be824a2d1939b800f837d4e
    Reviewed-on: https://gerrit.libreoffice.org/75801
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>
    Tested-by: Caolán McNamara <caol...@redhat.com>

diff --git a/reportdesign/source/ui/dlg/Formula.cxx 
b/reportdesign/source/ui/dlg/Formula.cxx
index 919deaeec869..f4c46be3ce6c 100644
--- a/reportdesign/source/ui/dlg/Formula.cxx
+++ b/reportdesign/source/ui/dlg/Formula.cxx
@@ -52,7 +52,7 @@ FormulaDialog::FormulaDialog(weld::Window* pParent
                              , svl::SharedStringPool& rStrPool )
     : FormulaModalDialog( pParent, _pFunctionMgr.get(),this)
     ,m_aFunctionManager(_pFunctionMgr)
-    ,m_pFormulaData(new FormEditData())
+    ,m_xFormulaData(new FormEditData())
     ,m_pAddField(nullptr)
     ,m_xRowSet(_xRowSet)
     ,m_pEdit(nullptr)
@@ -94,7 +94,7 @@ FormulaDialog::~FormulaDialog()
         
aDlgOpt.SetWindowState(OStringToOUString(m_pAddField->GetWindowState(WindowStateMask::X
 | WindowStateMask::Y | WindowStateMask::State | WindowStateMask::Minimized), 
RTL_TEXTENCODING_ASCII_US));
     }
 
-    StoreFormEditData( m_pFormulaData );
+    StoreFormEditData(m_xFormulaData.get());
     m_pEdit = nullptr;
     m_pAddField.clear();
 }
@@ -145,7 +145,7 @@ void FormulaDialog::switchBack()
 }
 FormEditData* FormulaDialog::getFormEditData() const
 {
-    return m_pFormulaData;
+    return m_xFormulaData.get();
 }
 void FormulaDialog::setCurrentFormula(const OUString& _sReplacement)
 {
diff --git a/reportdesign/source/ui/inc/Formula.hxx 
b/reportdesign/source/ui/inc/Formula.hxx
index 394d0b147b4e..1335c6012dd8 100644
--- a/reportdesign/source/ui/inc/Formula.hxx
+++ b/reportdesign/source/ui/inc/Formula.hxx
@@ -45,8 +45,8 @@ class OAddFieldWindow;
 class FormulaDialog : public formula::FormulaModalDialog,
                       public formula::IControlReferenceHandler
 {
-    std::shared_ptr< formula::IFunctionManager > m_aFunctionManager;
-    formula::FormEditData* const       m_pFormulaData;
+    std::shared_ptr<formula::IFunctionManager> m_aFunctionManager;
+    std::unique_ptr<formula::FormEditData> m_xFormulaData;
     VclPtr<OAddFieldWindow>            m_pAddField;
     css::uno::Reference < css::beans::XPropertySet >          m_xRowSet;
     css::uno::Reference< css::report::meta::XFormulaParser>   m_xParser;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to