Don't allow ws2_32 access to apps with bad setup data

(commit correct version this time)

svn path=/trunk/; revision=23596
This commit is contained in:
Ged Murphy
2006-08-17 16:48:36 +00:00
parent 885da5be07
commit 369176ea9d
2 changed files with 6 additions and 3 deletions
@@ -28,6 +28,7 @@ unsigned long strtoul(const char *nptr, char **endptr, int base);
#define EXPORT STDCALL
extern HINSTANCE g_hInstDll;
extern HANDLE GlobalHeap;
extern BOOL WsaInitialized; /* TRUE if WSAStartup() has been successfully called */
extern WSPUPCALLTABLE UpcallTable;
+5 -3
View File
@@ -27,7 +27,7 @@ DWORD DebugTraceLevel = 0;
/* 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 @@ WSAStartup(IN WORD wVersionRequested,
if (lpWSAData == NULL)
return WSAEFAULT;
Low = LOWBYTE(wVersionRequested);
High = HIGHBYTE(wVersionRequested);
Low = LOBYTE(wVersionRequested);
High = HIBYTE(wVersionRequested);
if (Low < 1)
{
@@ -841,6 +841,8 @@ DllMain(HANDLE hInstDll,
{
GlobalHeap = GetProcessHeap();
g_hInstDll = hInstDll;
CreateCatalog();
InitProviderHandleTable();