mirror of
https://github.com/moparisthebest/curl
synced 2024-11-05 00:55:04 -05:00
select: add 'timeout_ms' wrap-around precaution to Curl_select
This commit is contained in:
parent
041e778f1e
commit
696cfc0f6c
@ -122,6 +122,12 @@ int Curl_select(curl_socket_t maxfd,
|
||||
int pending_ms;
|
||||
int r;
|
||||
|
||||
#if SIZEOF_TIME_T != SIZEOF_INT
|
||||
/* wrap-around precaution */
|
||||
if(timeout_ms >= INT_MAX)
|
||||
timeout_ms = INT_MAX;
|
||||
#endif
|
||||
|
||||
#ifdef USE_WINSOCK
|
||||
/* WinSock select() can't handle zero events. See the comment below. */
|
||||
if((!fds_read || fds_read->fd_count == 0) &&
|
||||
|
Loading…
Reference in New Issue
Block a user