[Libreoffice-commits] core.git: 2 commits - dbaccess/source svtools/source

Norbert Thiebaud nthiebaud at gmail.com
Fri Sep 5 03:45:23 PDT 2014


 dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx |    2 +-
 svtools/source/misc/acceleratorexecute.cxx            |    5 ++++-
 2 files changed, 5 insertions(+), 2 deletions(-)

New commits:
commit cee813ac6e24b73879312b43695b92fe77b34444
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Fri Sep 5 12:44:21 2014 +0200

    fdo#69162 avoid crashing on Accellerator in poorly initialized context
    
    Change-Id: If3446ae33f2c2e737acf56bb523519e7b9d9935e

diff --git a/svtools/source/misc/acceleratorexecute.cxx b/svtools/source/misc/acceleratorexecute.cxx
index 8d8ebc9..77008c2 100644
--- a/svtools/source/misc/acceleratorexecute.cxx
+++ b/svtools/source/misc/acceleratorexecute.cxx
@@ -181,8 +181,11 @@ bool AcceleratorExecute::execute(const css::awt::KeyEvent& aAWTKey)
     OUString sCommand = impl_ts_findCommand(aAWTKey);
 
     // No Command found? Do nothing! User isnt interested on any error handling .-)
-    if (sCommand.isEmpty())
+    // or for some reason m_xContext is NULL (which would crash impl_ts_getURLParser()
+    if (sCommand.isEmpty() || !m_xContext.is())
+    {
         return false;
+    }
 
     // SAFE -> ----------------------------------
     ::osl::ResettableMutexGuard aLock(m_aLock);
commit dcbd4c636b26a3a521895e423546597e9decf45f
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Thu Sep 4 17:51:07 2014 +0200

    yet another overrun access of an empty OUString
    
    no impact in release build but triiger assert in debug
    
    Change-Id: I037cf127ff55c03dbc5e151d1373cfb4f6219848

diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index 195af53..43fc420 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -2121,7 +2121,7 @@ OUString OSelectionBrowseBox::GetCellText(long nRow, sal_uInt16 nColId) const
         case BROW_FIELD_ROW:
         {
             OUString aField = pEntry->GetField();
-            if (aField[0] == '*')                   // * durch alias.* ersetzen
+            if (!aField.isEmpty() && aField[0] == '*')                   // * durch alias.* ersetzen
             {
                 aField = pEntry->GetAlias();
                 if(!aField.isEmpty())


More information about the Libreoffice-commits mailing list