Author: hdu Date: Wed Jul 9 15:23:59 2014 New Revision: 1609204 URL: http://svn.apache.org/r1609204 Log: #i125226# don't try to access known-bad DDE servers
Modified: openoffice/trunk/main/sfx2/source/appl/impldde.cxx Modified: openoffice/trunk/main/sfx2/source/appl/impldde.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sfx2/source/appl/impldde.cxx?rev=1609204&r1=1609203&r2=1609204&view=diff ============================================================================== --- openoffice/trunk/main/sfx2/source/appl/impldde.cxx (original) +++ openoffice/trunk/main/sfx2/source/appl/impldde.cxx Wed Jul 9 15:23:59 2014 @@ -255,9 +255,14 @@ sal_Bool SvDDEObject::Connect( SvBaseLin } #if defined(WNT) + 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); - // Server nicht da, starten und nochmal versuchen - if( !bInWinExec ) + // try to start the DDE server if it is not there + if( !bForbidden ) { ByteString aCmdLine( sServer, RTL_TEXTENCODING_ASCII_US ); aCmdLine.Append( ".exe " );