Commit 9744055c authored by Paul Gofman's avatar Paul Gofman Committed by Alexandre Julliard

ws2_32: Return WSAENOBUFS from setsockopt() for IPPROTO_IP with negative optlen.

parent b2d1d090
......@@ -2946,6 +2946,12 @@ int WINAPI setsockopt( SOCKET s, int level, int optname, const char *optval, int
break;
case IPPROTO_IP:
if (optlen < 0)
{
SetLastError(WSAENOBUFS);
return SOCKET_ERROR;
}
switch(optname)
{
case IP_ADD_MEMBERSHIP:
......
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