mirror of
https://github.com/moparisthebest/curl
synced 2024-12-24 00:58:48 -05:00
security: silence conversion warning
With MinGW-w64, `curl_socket_t` is is a 32 or 64 bit unsigned integer, while `read` expects a 32 bit signed integer. Use `sread` instead of `read` to use the correct parameter type. Closes https://github.com/curl/curl/pull/4483
This commit is contained in:
parent
be16d8d994
commit
a626fa128c
@ -236,7 +236,7 @@ static ssize_t sec_recv(struct connectdata *conn, int sockindex,
|
||||
|
||||
/* Handle clear text response. */
|
||||
if(conn->sec_complete == 0 || conn->data_prot == PROT_CLEAR)
|
||||
return read(fd, buffer, len);
|
||||
return sread(fd, buffer, len);
|
||||
|
||||
if(conn->in_buffer.eof_flag) {
|
||||
conn->in_buffer.eof_flag = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user