[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - shell/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Sep 14 13:17:27 UTC 2018
shell/source/backends/kde5be/kde5backend.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 79dfbd20de1636e60fb6b8b1a08d0784a4188715
Author: Michael Weghorn <m.weghorn at posteo.de>
AuthorDate: Fri Sep 14 09:11:09 2018 +0200
Commit: Katarina Behrens <Katarina.Behrens at cib.de>
CommitDate: Fri Sep 14 15:17:03 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/60485
Reviewed-by: Katarina Behrens <Katarina.Behrens at cib.de>
diff --git a/shell/source/backends/kde5be/kde5backend.cxx b/shell/source/backends/kde5be/kde5backend.cxx
index 0c0472b0233a..e2f6e25c0764 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