Zebediah Figura : ws2_32: Cast the WSAPoll() timeout to LONGLONG before multiplying.
Alexandre Julliard
julliard at winehq.org
Fri Jan 14 15:11:16 CST 2022
Module: wine
Branch: master
Commit: c0d20bb3c06e299ac398a125e5ae93f19ebebe3b
URL: https://source.winehq.org/git/wine.git/?a=commit;h=c0d20bb3c06e299ac398a125e5ae93f19ebebe3b
Author: Zebediah Figura <zfigura at codeweavers.com>
Date: Thu Jan 13 19:16:15 2022 -0600
ws2_32: Cast the WSAPoll() timeout to LONGLONG before multiplying.
This is not particularly likely to overflow, but there is no harm in being
careful.
Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
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 a7e3e0ab0d7..fe7e4fb3464 100644
--- a/dlls/ws2_32/socket.c
+++ b/dlls/ws2_32/socket.c
@@ -2574,7 +2574,7 @@ int WINAPI WSAPoll( WSAPOLLFD *fds, ULONG count, int timeout )
return SOCKET_ERROR;
}
- params->timeout = (timeout >= 0 ? timeout * -10000 : TIMEOUT_INFINITE);
+ params->timeout = (timeout >= 0 ? (LONGLONG)timeout * -10000 : TIMEOUT_INFINITE);
for (i = 0; i < count; ++i)
{
More information about the wine-cvs
mailing list