summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2015-02-03 12:57:40 +0100
committerAndras Timar <andras.timar@collabora.com>2015-02-06 13:13:44 +0100
commit57e8e9e8bc46313ddc4a3ce7b8e0d479c9018d66 (patch)
tree4e52ac79d3dc3586f4e533a8a54ea80974d7e7ae
parent3c282929fed0b9484ba5adfc68019010bf47f552 (diff)
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@mamane.lu> Tested-by: Lionel Elie Mamane <lionel@mamane.lu>
-rw-r--r--sw/source/ui/fldui/changedb.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sw/source/ui/fldui/changedb.cxx b/sw/source/ui/fldui/changedb.cxx
index 8ef135a83572..80cfb68e7ac8 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)