diff options
author | NIIBE Yutaka <[email protected]> | 2022-10-07 02:16:55 +0000 |
---|---|---|
committer | NIIBE Yutaka <[email protected]> | 2022-10-07 02:16:55 +0000 |
commit | d68a803c4760415204fb3e7af4c0195ee2cd09ad (patch) | |
tree | 1f59b3d48f7b582f97b510249d1153588d7fce5f /g10/decrypt.c | |
parent | wkd: New command --mirror for gpg-wks-client. (diff) | |
download | gnupg-d68a803c4760415204fb3e7af4c0195ee2cd09ad.tar.gz gnupg-d68a803c4760415204fb3e7af4c0195ee2cd09ad.zip |
gpg: Fix wrong use of FD2INT with iobuf_fdopen_nc.
* g10/decrypt.c (decrypt_message_fd): Use INPUT_FD directly.
* g10/encrypt.c (encrypt_crypt): Use FILEFD directly.
--
Before 8402815d, original code was with iobuf_open_fd_or_name, which
used gnupg_fd_t for the file descriptor (FD2INT was relevant at that
time). After the change, because it's not gnupg_fd_t but int, use of
FD2INT is irrelevant.
Fixes-commit: 8402815d8e0e04a44362968f88b3d484d2395402
Signed-off-by: NIIBE Yutaka <[email protected]>
Diffstat (limited to 'g10/decrypt.c')
-rw-r--r-- | g10/decrypt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/g10/decrypt.c b/g10/decrypt.c index 065601b7b..cb9e36a93 100644 --- a/g10/decrypt.c +++ b/g10/decrypt.c @@ -120,7 +120,7 @@ decrypt_message_fd (ctrl_t ctrl, int input_fd, int output_fd) pfx = new_progress_context (); /* Open the message file. */ - fp = iobuf_fdopen_nc (FD2INT(input_fd), "rb"); + fp = iobuf_fdopen_nc (input_fd, "rb"); if (fp && is_secured_file (iobuf_get_fd (fp))) { iobuf_close (fp); |