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:
parent
9ff978e572
commit
ab8b7ed549
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue