ws2_32: Treat optlen as unsigned in setsockopt() for SO_SNDTIMEO.

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-05 22:04:05 +03:00 committed by Alexandre Julliard
parent 4fa4339748
commit b2d1d09083
1 changed files with 1 additions and 0 deletions

View File

@ -2837,6 +2837,7 @@ int WINAPI setsockopt( SOCKET s, int level, int optname, const char *optval, int
return server_setsockopt( s, IOCTL_AFD_WINE_SET_SO_SNDBUF, optval, optlen );
case SO_SNDTIMEO:
if (optlen < 0) optlen = 4;
return server_setsockopt( s, IOCTL_AFD_WINE_SET_SO_SNDTIMEO, optval, optlen );
/* SO_DEBUG is a privileged operation, ignore it. */