summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHerbert Dürr <hdu@apache.org>2014-07-09 15:23:59 +0000
committerHerbert Dürr <hdu@apache.org>2014-07-09 15:23:59 +0000
commit88de6a59d9d7933b86fdcba733277aa4fbd5e132 (patch)
tree3f5ed61aa020bb3ebad53704a7ce2819787fce11
parente58576b77160240afb952e55b1f125cf703ae195 (diff)
#i125226# don't try to access known-bad DDE servers
Notes
-rw-r--r--sfx2/source/appl/impldde.cxx11
1 files changed, 8 insertions, 3 deletions
diff --git a/sfx2/source/appl/impldde.cxx b/sfx2/source/appl/impldde.cxx
index c4d8ae6463b4..2dfe160f5468 100644
--- a/sfx2/source/appl/impldde.cxx
+++ b/sfx2/source/appl/impldde.cxx
@@ -255,9 +255,14 @@ sal_Bool SvDDEObject::Connect( SvBaseLink * pSvLink )
}
#if defined(WNT)
-
- // Server nicht da, starten und nochmal versuchen
- if( !bInWinExec )
+ bool bForbidden = bInWinExec;
+ // TODO: also check the security level
+ static const char* aBadServers[] = { "cmd" };
+ for( int i = 0; i < sizeof(aBadServers)/sizeof(*aBadServers); ++i)
+ bForbidden |= (sServer.CompareIgnoreCaseToAscii( aBadServers[i]) == COMPARE_EQUAL);
+
+ // try to start the DDE server if it is not there
+ if( !bForbidden )
{
ByteString aCmdLine( sServer, RTL_TEXTENCODING_ASCII_US );
aCmdLine.Append( ".exe " );