[MSAFD] When out of band data is inlined, calling WSPRecv/WSPRecvFrom with flag MSG_OOB is invalid, return WSAEINVAL. CORE-12104

svn path=/trunk/; revision=73231
This commit is contained in:
Peter Hater 2016-11-14 14:10:48 +00:00
parent 02a4d63dc1
commit e27a5768be

View file

@ -193,6 +193,12 @@ WSPRecv(SOCKET Handle,
*lpErrno = WSAEFAULT;
return SOCKET_ERROR;
}
if (Socket->SharedData->OobInline && ReceiveFlags && (*ReceiveFlags & MSG_OOB) != 0)
{
if (lpErrno)
*lpErrno = WSAEINVAL;
return SOCKET_ERROR;
}
Status = NtCreateEvent( &SockEvent, EVENT_ALL_ACCESS,
NULL, 1, FALSE );
@ -381,6 +387,12 @@ WSPRecvFrom(SOCKET Handle,
*lpErrno = WSAEFAULT;
return SOCKET_ERROR;
}
if (Socket->SharedData->OobInline && ReceiveFlags && (*ReceiveFlags & MSG_OOB) != 0)
{
if (lpErrno)
*lpErrno = WSAEINVAL;
return SOCKET_ERROR;
}
if (!(Socket->SharedData->ServiceFlags1 & XP1_CONNECTIONLESS))
{