aboutsummaryrefslogtreecommitdiff
path: root/lib/vtls
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-04-15 10:27:20 +0200
committerDaniel Stenberg <daniel@haxx.se>2020-04-23 15:57:23 +0200
commita96c7529eb31498a464910935a7d1a5e88ce3914 (patch)
treefbdbc3fbdcd5eb701cdd7946e93edaa46d48cf77 /lib/vtls
parentb1b96926148758c6a8de0898269c11b0e555ed66 (diff)
select: make Curl_socket_check take timediff_t timeout
Coverity found CID 1461718: Integer handling issues (CONSTANT_EXPRESSION_RESULT) "timeout_ms > 9223372036854775807L" is always false regardless of the values of its operands. This occurs as the logical second operand of "||". Closes #5240
Diffstat (limited to 'lib/vtls')
-rw-r--r--lib/vtls/schannel.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/vtls/schannel.c b/lib/vtls/schannel.c
index dce6242da..49659bb7a 100644
--- a/lib/vtls/schannel.c
+++ b/lib/vtls/schannel.c
@@ -1645,9 +1645,9 @@ schannel_send(struct connectdata *conn, int sockindex,
written = -1;
break;
}
- if(!timeout_ms || timeout_ms > TIME_T_MAX)
- timeout_ms = TIME_T_MAX;
- what = SOCKET_WRITABLE(conn->sock[sockindex], (time_t)timeout_ms);
+ if(!timeout_ms)
+ timeout_ms = TIMEDIFF_T_MAX;
+ what = SOCKET_WRITABLE(conn->sock[sockindex], timeout_ms);
if(what < 0) {
/* fatal error */
failf(conn->data, "select/poll on SSL socket, errno: %d", SOCKERRNO);