ws2_32: Return WSAENOBUFS from setsockopt() for IPPROTO_IP 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
b2d1d09083
commit
9744055cf4
|
@ -2946,6 +2946,12 @@ int WINAPI setsockopt( SOCKET s, int level, int optname, const char *optval, int
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IPPROTO_IP:
|
case IPPROTO_IP:
|
||||||
|
if (optlen < 0)
|
||||||
|
{
|
||||||
|
SetLastError(WSAENOBUFS);
|
||||||
|
return SOCKET_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
switch(optname)
|
switch(optname)
|
||||||
{
|
{
|
||||||
case IP_ADD_MEMBERSHIP:
|
case IP_ADD_MEMBERSHIP:
|
||||||
|
|
Loading…
Reference in New Issue