Commit 48656f55 authored by Alexandre Julliard's avatar Alexandre Julliard

ws2_32: Check buffers before recvmsg() to trigger write watches.

parent 0a2380f9
......@@ -4409,6 +4409,12 @@ INT WINAPI WSARecvFrom( SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount,
wsa->first_iovec = 0;
for (i = 0; i < dwBufferCount; i++)
{
/* check buffer first to trigger write watches */
if (IsBadWritePtr( lpBuffers[i].buf, lpBuffers[i].len ))
{
err = WSAEFAULT;
goto error;
}
wsa->iovec[i].iov_base = lpBuffers[i].buf;
wsa->iovec[i].iov_len = lpBuffers[i].len;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment