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

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Paul Gofman 2022-03-10 12:40:56 +03:00 committed by Alexandre Julliard
parent 9ff978e572
commit ab8b7ed549
1 changed files with 6 additions and 0 deletions

View File

@ -3149,6 +3149,12 @@ int WINAPI setsockopt( SOCKET s, int level, int optname, const char *optval, int
break;
case IPPROTO_IPV6:
if (optlen < 0)
{
SetLastError( WSAENOBUFS );
return SOCKET_ERROR;
}
switch(optname)
{
case IPV6_ADD_MEMBERSHIP: