Author: tfaber
Date: Thu Jun 21 23:43:24 2012
New Revision: 56782
URL:
http://svn.reactos.org/svn/reactos?rev=56782&view=rev
Log:
[MSAFD]
- Gracefully handle lpcbBytesReturned == NULL condition in WSPIoctl. Fixes crash in
ws2_32:sock
Modified:
trunk/reactos/dll/win32/msafd/misc/dllmain.c
Modified: trunk/reactos/dll/win32/msafd/misc/dllmain.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msafd/misc/dllma…
==============================================================================
--- trunk/reactos/dll/win32/msafd/misc/dllmain.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msafd/misc/dllmain.c [iso-8859-1] Thu Jun 21 23:43:24 2012
@@ -1968,6 +1968,12 @@
BOOLEAN NeedsCompletion;
BOOLEAN NonBlocking;
+ if (!lpcbBytesReturned)
+ {
+ *lpErrno = WSAEFAULT;
+ return SOCKET_ERROR;
+ }
+
/* Get the Socket Structure associate to this Socket*/
Socket = GetSocketStructure(Handle);
if (!Socket)