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:
Marcel Raad 2019-10-13 19:14:39 +02:00
parent be16d8d994
commit a626fa128c
No known key found for this signature in database
GPG Key ID: FE4D8BC5EE1701DD
1 changed files with 1 additions and 1 deletions

View File

@ -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;