From: Zebediah Figura Subject: [PATCH 1/2] ws2_32: Cast timeval fields to LONGLONG before multiplying. Message-Id: <20220114011615.17948-1-zfigura@codeweavers.com> Date: Thu, 13 Jan 2022 19:16:14 -0600 WXWORK passes 300 seconds, which overflows 32-bit multiplication. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52383 Signed-off-by: Zebediah Figura --- dlls/ws2_32/socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index f0c8f4a72d0..87fa3629b1c 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -2409,7 +2409,7 @@ int WINAPI select( int count, fd_set *read_ptr, fd_set *write_ptr, } if (timeout) - params->timeout = timeout->tv_sec * -10000000 + timeout->tv_usec * -10; + params->timeout = (LONGLONG)timeout->tv_sec * -10000000 + (LONGLONG)timeout->tv_usec * -10; else params->timeout = TIMEOUT_INFINITE; -- 2.34.1