mirror of
https://github.com/curl/curl.git
synced 2026-04-14 22:31:41 +03: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
1 changed files with 1 additions and 0 deletions
|
|
@ -317,6 +317,7 @@ int Curl_wakeup_signal(curl_socket_t socks[2])
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
while(1) {
|
while(1) {
|
||||||
|
err = 0;
|
||||||
if(wakeup_write(socks[1], buf, sizeof(buf)) < 0) {
|
if(wakeup_write(socks[1], buf, sizeof(buf)) < 0) {
|
||||||
err = SOCKERRNO;
|
err = SOCKERRNO;
|
||||||
#ifdef USE_WINSOCK
|
#ifdef USE_WINSOCK
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue