From 25701f105b947500f920eb5a13e328f8f7843d38 Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Thu, 28 Jul 2022 12:00:45 +0900 Subject: w32: Fix for bidirectional pipe. * src/estream.c (func_w32_seek): Return an error with ESPIPE, when it's pipe. -- GnuPG-bug-id: 6112 Signed-off-by: NIIBE Yutaka --- src/estream.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/estream.c b/src/estream.c index 07a5d97..17d599f 100644 --- a/src/estream.c +++ b/src/estream.c @@ -1560,6 +1560,12 @@ func_w32_seek (void *cookie, gpgrt_off_t *offset, int whence) return -1; } + if (GetFileType (w32_cookie->hd) == FILE_TYPE_PIPE) + { + _set_errno (ESPIPE); + return -1; + } + if (whence == SEEK_SET) { method = FILE_BEGIN; -- cgit v1.2.1