mirror of
https://github.com/curl/curl.git
synced 2026-07-16 07:27:15 +03:00
telnet: check return code from fileno()
and return error if necessary Spotted by CodeSonar Closes #13457
This commit is contained in:
parent
f33ee2e73b
commit
a090111613
1 changed files with 5 additions and 0 deletions
|
|
@ -1535,6 +1535,11 @@ static CURLcode telnet_do(struct Curl_easy *data, bool *done)
|
|||
pfd[1].events = POLLIN;
|
||||
poll_cnt = 2;
|
||||
interval_ms = 1 * 1000;
|
||||
if(pfd[1].fd < 0) {
|
||||
failf(data, "cannot read input");
|
||||
result = CURLE_RECV_ERROR;
|
||||
keepon = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
while(keepon) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue