[MSAFD] When out of band data is inlined, calling WSPRecv/WSPRecvFrom with flag MSG_O...
authorPeter Hater <7element@mail.bg>
Mon, 14 Nov 2016 14:10:48 +0000 (14:10 +0000)
committerPeter Hater <7element@mail.bg>
Mon, 14 Nov 2016 14:10:48 +0000 (14:10 +0000)
svn path=/trunk/; revision=73231

reactos/dll/win32/msafd/misc/sndrcv.c

index 15247c7..2f5fd32 100644 (file)
@@ -193,6 +193,12 @@ WSPRecv(SOCKET Handle,
             *lpErrno = WSAEFAULT;
         return SOCKET_ERROR;
     }
             *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 );
 
     Status = NtCreateEvent( &SockEvent, EVENT_ALL_ACCESS,
                             NULL, 1, FALSE );
@@ -381,6 +387,12 @@ WSPRecvFrom(SOCKET Handle,
             *lpErrno = WSAEFAULT;
         return SOCKET_ERROR;
     }
             *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))
     {
 
     if (!(Socket->SharedData->ServiceFlags1 & XP1_CONNECTIONLESS))
     {