Author: phater
Date: Mon Nov 14 14:10:48 2016
New Revision: 73231
URL:
http://svn.reactos.org/svn/reactos?rev=73231&view=rev
Log:
[MSAFD] When out of band data is inlined, calling WSPRecv/WSPRecvFrom with flag MSG_OOB is
invalid, return WSAEINVAL. CORE-12104
Modified:
trunk/reactos/dll/win32/msafd/misc/sndrcv.c
Modified: trunk/reactos/dll/win32/msafd/misc/sndrcv.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msafd/misc/sndrc…
==============================================================================
--- trunk/reactos/dll/win32/msafd/misc/sndrcv.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msafd/misc/sndrcv.c [iso-8859-1] Mon Nov 14 14:10:48 2016
@@ -191,6 +191,12 @@
{
if (lpErrno)
*lpErrno = WSAEFAULT;
+ return SOCKET_ERROR;
+ }
+ if (Socket->SharedData->OobInline && ReceiveFlags &&
(*ReceiveFlags & MSG_OOB) != 0)
+ {
+ if (lpErrno)
+ *lpErrno = WSAEINVAL;
return SOCKET_ERROR;
}
@@ -379,6 +385,12 @@
{
if (lpErrno)
*lpErrno = WSAEFAULT;
+ return SOCKET_ERROR;
+ }
+ if (Socket->SharedData->OobInline && ReceiveFlags &&
(*ReceiveFlags & MSG_OOB) != 0)
+ {
+ if (lpErrno)
+ *lpErrno = WSAEINVAL;
return SOCKET_ERROR;
}