Kaydet (Commit) afd74314 authored tarafından Michael Stahl's avatar Michael Stahl Kaydeden (comit) Lionel Elie Mamane

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 8a7a9992)

Change-Id: Ibf8c0091da672e133d7a35bc61c059eaf65a3bc2
Reviewed-on: https://gerrit.libreoffice.org/14302Reviewed-by: 's avatarLionel Elie Mamane <lionel@mamane.lu>
Tested-by: 's avatarLionel Elie Mamane <lionel@mamane.lu>
üst 3e8c5491
......@@ -192,7 +192,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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment