mirror of
https://github.com/curl/curl.git
synced 2026-04-11 12:01:42 +08:00
socketpair: clear 'err' when retrying due to EINTR
If the first write was interrupted by a signal and a subsequent write succeeds, the function would still erroneously return EINTR. Found by Codex Security Closes #20809
This commit is contained in:
parent
e49efce12f
commit
e47b6e657a
@ -317,6 +317,7 @@ int Curl_wakeup_signal(curl_socket_t socks[2])
|
||||
#endif
|
||||
|
||||
while(1) {
|
||||
err = 0;
|
||||
if(wakeup_write(socks[1], buf, sizeof(buf)) < 0) {
|
||||
err = SOCKERRNO;
|
||||
#ifdef USE_WINSOCK
|
||||
|
||||
Loading…
Reference in New Issue
Block a user