1
0
mirror of https://github.com/solemnwarning/ipxwrapper synced 2024-12-30 16:45:37 +01:00

Load EnumProtocolsA/EnumProtocolsW functions directly from mswsock.dll to avoid stack overflow when the program uses mswsock.dll.

This commit is contained in:
Daniel Collins 2011-09-15 14:28:31 +00:00
parent 6fff1e839c
commit 812e6cd2ad
2 changed files with 6 additions and 4 deletions

View File

@ -113,9 +113,11 @@ void load_dll(unsigned int dllnum) {
strcat(path, dll_names[dllnum]); strcat(path, dll_names[dllnum]);
} }
dll_handles[dllnum] = LoadLibrary(dllnum ? path : dll_names[dllnum]); const char *dll = dllnum ? path : dll_names[dllnum];
dll_handles[dllnum] = LoadLibrary(dll);
if(!dll_handles[dllnum]) { if(!dll_handles[dllnum]) {
log_printf("Error loading %s: %s", path, w32_error(GetLastError())); log_printf("Error loading %s: %s", dll, w32_error(GetLastError()));
abort(); abort();
} }
} }

View File

@ -17,8 +17,8 @@ WSAEventSelect:4
WSACloseEvent:4 WSACloseEvent:4
WSAResetEvent:4 WSAResetEvent:4
WSASetEvent:4 WSASetEvent:4
r_EnumProtocolsA:1 r_EnumProtocolsA:2
r_EnumProtocolsW:1 r_EnumProtocolsW:2
r_WSARecvEx:4 r_WSARecvEx:4
r_bind:4 r_bind:4
r_closesocket:4 r_closesocket:4