[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - sw/source

Michael Stahl mstahl at redhat.com
Tue Feb 3 05:26:45 PST 2015


 sw/source/ui/fldui/changedb.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit ce1af2f54e06933b372f832cc110bdd4d9edfb8f
Author: Michael Stahl <mstahl at redhat.com>
Date:   Tue Feb 3 12:57:40 2015 +0100

    tdf#77241: sw: fix creation of field data source string
    
    SwChangeDBDlg::UpdateFlds() depends on undefined behaviour in
    constructing sTemp, because the call to GetDBName initializes local
    variables that are already used in other sub-expressions of the
    statement.
    
    (regression from 8a7a9992906ba59d575ca9e4441b3e84fea5fae0)
    
    Change-Id: Ibf8c0091da672e133d7a35bc61c059eaf65a3bc2
    Reviewed-on: https://gerrit.libreoffice.org/14305
    Reviewed-by: Lionel Elie Mamane <lionel at mamane.lu>
    Tested-by: Lionel Elie Mamane <lionel at mamane.lu>

diff --git a/sw/source/ui/fldui/changedb.cxx b/sw/source/ui/fldui/changedb.cxx
index 8ef135a..80cfb68 100644
--- a/sw/source/ui/fldui/changedb.cxx
+++ b/sw/source/ui/fldui/changedb.cxx
@@ -203,7 +203,8 @@ void SwChangeDBDlg::UpdateFlds()
     OUString sTableName;
     OUString sColumnName;
     sal_Bool bIsTable = sal_False;
-    const OUString sTemp = m_pAvailDBTLB->GetDBName(sTableName, sColumnName, &bIsTable)
+    const OUString DBName(m_pAvailDBTLB->GetDBName(sTableName, sColumnName, &bIsTable));
+    const OUString sTemp = DBName
         + OUString(DB_DELIM)
         + sTableName
         + OUString(DB_DELIM)


More information about the Libreoffice-commits mailing list