Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 179399 Details for
Bug 325903
[launcher] Windows LoadLibrary search cwd DLL exploit
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
patch
325903.txt (text/plain), 1.41 KB, created by
Andrew Niefer
on 2010-09-22 14:43:17 EDT
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Andrew Niefer
Created:
2010-09-22 14:43:17 EDT
Size:
1.41 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.equinox.executable >Index: library/eclipse.c >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.equinox/framework/bundles/org.eclipse.equinox.executable/library/eclipse.c,v >retrieving revision 1.61.2.1 >diff -u -r1.61.2.1 eclipse.c >--- library/eclipse.c 22 Sep 2010 17:24:13 -0000 1.61.2.1 >+++ library/eclipse.c 22 Sep 2010 18:32:25 -0000 >@@ -332,6 +332,7 @@ > > #ifdef _WIN32 > static void createConsole(); >+static void fixDLLSearchPath(); > #endif > > /* Record the arguments that were used to start the original executable */ >@@ -370,6 +371,9 @@ > * it now. > */ > initWindowSystem( &argc, argv, !noSplash ); >+#elif _WIN32 >+ /* fix the DLL search path for security reasons */ >+ fixDLLSearchPath(); > #endif > > /* Find the directory where the Eclipse program is installed. */ >@@ -1186,6 +1190,22 @@ > *stderr = *fp; > } > } >+ >+static void fixDLLSearchPath() { >+#ifdef UNICODE >+ _TCHAR* functionName = _T_ECLIPSE("SetDllDirectoryW"); >+#else >+ _TCHAR* functionName = _T_ECLIPSE("SetDllDirectoryA"); >+#endif >+ >+ BOOL (WINAPI *SetDLLDirectory)(LPCTSTR); >+ void * handle = loadLibrary(_T_ECLIPSE("Kernel32.dll")); >+ if (handle != NULL) { >+ if ( (SetDLLDirectory = findSymbol(handle, functionName)) != NULL) { >+ SetDLLDirectory(_T_ECLIPSE("")); >+ } >+ } >+} > #endif > > /*
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 325903
: 179399