diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2018-09-14 09:11:09 +0200 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2018-09-14 12:33:07 +0200 |
commit | 2fdafe62ef3959ec34e05daf312088a8f0534d9a (patch) | |
tree | 33d592ce2b48a01a55ae5fad5682267ae28ee924 /shell/source/backends | |
parent | 59887868da3499c68d5f259cfa48178354397448 (diff) |
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@yahoo.fr>
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'shell/source/backends')
-rw-r--r-- | shell/source/backends/kde5be/kde5backend.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
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; |