gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnurl] 21/264: select: add 'timeout_ms' wrap-around precaution to Curl_


From: gnunet
Subject: [gnurl] 21/264: select: add 'timeout_ms' wrap-around precaution to Curl_select
Date: Thu, 30 Apr 2020 16:05:24 +0200

This is an automated email from the git hooks/post-receive script.

nikita pushed a commit to branch master
in repository gnurl.

commit 696cfc0f6ca4f4cf822cef50ff6ea8c012a016df
Author: Marc Hoersken <address@hidden>
AuthorDate: Thu Mar 12 09:34:34 2020 +0100

    select: add 'timeout_ms' wrap-around precaution to Curl_select
---
 lib/select.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lib/select.c b/lib/select.c
index bbada45fc..1ab023934 100644
--- a/lib/select.c
+++ b/lib/select.c
@@ -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) &&

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]