Author: gedmurphy Date: Thu Aug 17 20:48:36 2006 New Revision: 23596
URL: http://svn.reactos.org/svn/reactos?rev=23596&view=rev Log: Don't allow ws2_32 access to apps with bad setup data (commit correct version this time)
Modified: trunk/reactos/dll/win32/ws2_32/include/ws2_32.h trunk/reactos/dll/win32/ws2_32/misc/dllmain.c
Modified: trunk/reactos/dll/win32/ws2_32/include/ws2_32.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ws2_32/include/ws... ============================================================================== --- trunk/reactos/dll/win32/ws2_32/include/ws2_32.h (original) +++ trunk/reactos/dll/win32/ws2_32/include/ws2_32.h Thu Aug 17 20:48:36 2006 @@ -28,6 +28,7 @@
#define EXPORT STDCALL
+extern HINSTANCE g_hInstDll; extern HANDLE GlobalHeap; extern BOOL WsaInitialized; /* TRUE if WSAStartup() has been successfully called */ extern WSPUPCALLTABLE UpcallTable;
Modified: trunk/reactos/dll/win32/ws2_32/misc/dllmain.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ws2_32/misc/dllma... ============================================================================== --- trunk/reactos/dll/win32/ws2_32/misc/dllmain.c (original) +++ trunk/reactos/dll/win32/ws2_32/misc/dllmain.c Thu Aug 17 20:48:36 2006 @@ -27,7 +27,7 @@ /* To make the linker happy */ VOID STDCALL KeBugCheck (ULONG BugCheckCode) {}
- +HINSTANCE g_hInstDll; HANDLE GlobalHeap; BOOL WsaInitialized = FALSE; /* TRUE if WSAStartup() has been successfully called */ WSPUPCALLTABLE UpcallTable; @@ -86,8 +86,8 @@ if (lpWSAData == NULL) return WSAEFAULT;
- Low = LOWBYTE(wVersionRequested); - High = HIGHBYTE(wVersionRequested); + Low = LOBYTE(wVersionRequested); + High = HIBYTE(wVersionRequested);
if (Low < 1) { @@ -841,6 +841,8 @@ { GlobalHeap = GetProcessHeap();
+ g_hInstDll = hInstDll; + CreateCatalog();
InitProviderHandleTable();