From 88de6a59d9d7933b86fdcba733277aa4fbd5e132 Mon Sep 17 00:00:00 2001 From: Herbert Dürr Date: Wed, 9 Jul 2014 15:23:59 +0000 Subject: #i125226# don't try to access known-bad DDE servers --- sfx2/source/appl/impldde.cxx | 11 ++++++++--- 1 file 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 " ); -- cgit v1.2.3