[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-5-2+backports' - shell/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Sep 14 11:20:55 UTC 2018
shell/source/backends/kde5be/kde5backend.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 19759611473383003773d55c104ae6c7f3d0230b
Author: Michael Weghorn <m.weghorn at posteo.de>
AuthorDate: Fri Sep 14 09:11:09 2018 +0200
Commit: Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Fri Sep 14 13:20:29 2018 +0200
kde5backend.cxx: Fix inverted logic leading to invalid write
Only write to 'pFakeArgv[2]' when 'aDisplay' is NON-empty.
Otherwise, the 'pFakeArgv' array only has size 2 and the write
is invalid.
(Found by valgrind while looking at another issue.)
Change-Id: I58aff6d25c8647bc6ef346af8ac09b0b0fc030b8
Reviewed-on: https://gerrit.libreoffice.org/60476
Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn at posteo.de>
(cherry picked from commit 2fdafe62ef3959ec34e05daf312088a8f0534d9a)
Reviewed-on: https://gerrit.libreoffice.org/60486
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/shell/source/backends/kde5be/kde5backend.cxx b/shell/source/backends/kde5be/kde5backend.cxx
index 57f955cec1ad..9f9fb6f5c23b 100644
--- a/shell/source/backends/kde5be/kde5backend.cxx
+++ b/shell/source/backends/kde5be/kde5backend.cxx
@@ -159,7 +159,7 @@ void initQApp()
pFakeArgv[0] = strdup(getExecutable().getStr());
pFakeArgv[1] = strdup("--nocrashhandler");
- if (aDisplay.isEmpty())
+ if (!aDisplay.isEmpty())
pFakeArgv[2] = strdup(aDisplay.getStr());
char* session_manager = nullptr;
More information about the Libreoffice-commits
mailing list