[PATCH 2/2] ws2_32: Cast the WSAPoll() timeout to LONGLONG before multiplying.
Zebediah Figura
zfigura at codeweavers.com
Thu Jan 13 19:16:15 CST 2022
This is not particularly likely to overflow, but there is no harm in being
careful.
Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
---
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 87fa3629b1c..e43d6c5d671 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)
{
--
2.34.1
More information about the wine-devel
mailing list