[Libreoffice-commits] core.git: shell/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Sep 14 10:33:32 UTC 2018
shell/source/backends/kde5be/kde5backend.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 2fdafe62ef3959ec34e05daf312088a8f0534d9a
Author: Michael Weghorn <m.weghorn at posteo.de>
AuthorDate: Fri Sep 14 09:11:09 2018 +0200
Commit: Michael Weghorn <m.weghorn at posteo.de>
CommitDate: Fri Sep 14 12:33:07 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>
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