summaryrefslogtreecommitdiffstats
path: root/dirmngr/http.c
diff options
context:
space:
mode:
authorNIIBE Yutaka <gniibe@fsij.org>2022-03-30 06:05:41 +0200
committerNIIBE Yutaka <gniibe@fsij.org>2022-03-30 06:05:41 +0200
commit01ade6945d6c0cbc81e5169f74e3627fe5427be2 (patch)
tree1a74009f64f20331134a23589f12864cef80d37e /dirmngr/http.c
parenttpm2d: Fix socket resource leak on Windows. (diff)
downloadgnupg2-01ade6945d6c0cbc81e5169f74e3627fe5427be2.tar.xz
gnupg2-01ade6945d6c0cbc81e5169f74e3627fe5427be2.zip
dirmngr: Fix for SOCK.
* dirmngr/http.c (connect_with_timeout): Use FD2INT to unwrap SOCK. -- GnuPG-bug-id: 5899 Reported-by: Eli Zaretskii Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
Diffstat (limited to '')
-rw-r--r--dirmngr/http.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dirmngr/http.c b/dirmngr/http.c
index 73606c01c..1050d19ee 100644
--- a/dirmngr/http.c
+++ b/dirmngr/http.c
@@ -2885,7 +2885,7 @@ connect_with_timeout (assuan_fd_t sock,
* because the caller is expected to close the socket. */
return gpg_err_make (default_errsource, GPG_ERR_ETIMEDOUT);
}
- if (!FD_ISSET (sock, &rset) && !FD_ISSET (sock, &wset))
+ if (!FD_ISSET (FD2INT (sock), &rset) && !FD_ISSET (FD2INT (sock), &wset))
{
/* select misbehaved. */
return gpg_err_make (default_errsource, GPG_ERR_SYSTEM_BUG);