mirror of
https://github.com/curl/curl.git
synced 2026-08-24 22:43:38 +03:00
tftp: return error when sendto() fails
The code just called failf() and then continued without returning error. Reported in Joshua's sarif data Closes #18643
This commit is contained in:
parent
e2d3b83244
commit
66d6075af9
1 changed files with 2 additions and 1 deletions
|
|
@ -535,11 +535,12 @@ static CURLcode tftp_send_first(struct tftp_conn *state,
|
|||
(SEND_TYPE_ARG3)sbytes, 0,
|
||||
CURL_SENDTO_ARG5(&remote_addr->curl_sa_addr),
|
||||
(curl_socklen_t)remote_addr->addrlen);
|
||||
free(filename);
|
||||
if(senddata != (ssize_t)sbytes) {
|
||||
char buffer[STRERROR_LEN];
|
||||
failf(data, "%s", Curl_strerror(SOCKERRNO, buffer, sizeof(buffer)));
|
||||
return CURLE_SEND_ERROR;
|
||||
}
|
||||
free(filename);
|
||||
break;
|
||||
|
||||
case TFTP_EVENT_OACK:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue