aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/socks.c4
-rw-r--r--lib/vtls/schannel.c5
2 files changed, 6 insertions, 3 deletions
diff --git a/lib/socks.c b/lib/socks.c
index 37099130e..5dd83631c 100644
--- a/lib/socks.c
+++ b/lib/socks.c
@@ -68,7 +68,9 @@ int Curl_blockread_all(struct connectdata *conn, /* connection data */
result = CURLE_OPERATION_TIMEDOUT;
break;
}
- if(SOCKET_READABLE(sockfd, timeleft) <= 0) {
+ if(timeleft > TIME_T_MAX)
+ timeleft = TIME_T_MAX;
+ if(SOCKET_READABLE(sockfd, (time_t)timeleft) <= 0) {
result = ~CURLE_OK;
break;
}
diff --git a/lib/vtls/schannel.c b/lib/vtls/schannel.c
index 8bf598c07..cb70d5309 100644
--- a/lib/vtls/schannel.c
+++ b/lib/vtls/schannel.c
@@ -1645,8 +1645,9 @@ schannel_send(struct connectdata *conn, int sockindex,
written = -1;
break;
}
-
- what = SOCKET_WRITABLE(conn->sock[sockindex], timeleft);
+ if(timeleft > TIME_T_MAX)
+ timeleft = TIME_T_MAX;
+ what = SOCKET_WRITABLE(conn->sock[sockindex], (time_t)timeleft);
if(what < 0) {
/* fatal error */
failf(conn->data, "select/poll on SSL socket, errno: %d", SOCKERRNO);