diff options
author | Herbert Dürr <hdu@apache.org> | 2014-07-09 15:23:59 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-07-10 13:54:04 +0100 |
commit | b16f164650f8345e51bf0b0c73bf9c8eee775bc2 (patch) | |
tree | 3b192773d679a3ed66c7b54bd5f1383ca0e5698a /sfx2 | |
parent | 919fbc4d7bbc4da16cd16fa91355d2f441f088b4 (diff) |
Related: #i125226# don't try to access known-bad DDE servers
(cherry picked from commit 88de6a59d9d7933b86fdcba733277aa4fbd5e132)
Conflicts:
sfx2/source/appl/impldde.cxx
Change-Id: If4dcd49cfe15188d06e4e06cd8e58cdcc66ed5a4
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/impldde.cxx | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sfx2/source/appl/impldde.cxx b/sfx2/source/appl/impldde.cxx index 501346addc9c..3bb38bad8b9c 100644 --- a/sfx2/source/appl/impldde.cxx +++ b/sfx2/source/appl/impldde.cxx @@ -243,9 +243,14 @@ bool SvDDEObject::Connect( SvBaseLink * pSvLink ) } #if defined(WNT) - - // Server not up, try once more to start it. - if( !bInWinExec ) + bool bForbidden = bInWinExec; + // TODO: also check the security level + static const char* aBadServers[] = { "cmd" }; + for (size_t i = 0; i < sizeof(aBadServers)/sizeof(*aBadServers); ++i) + bForbidden |= sServer.equalsAscii(aBadServers[i]); + + // try to start the DDE server if it is not there + if( !bForbidden ) { OStringBuffer aCmdLine(OUStringToOString(sServer, RTL_TEXTENCODING_ASCII_US)); aCmdLine.append(".exe "); |