summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNIIBE Yutaka <gniibe@fsij.org>2022-07-28 12:00:45 +0900
committerNIIBE Yutaka <gniibe@fsij.org>2022-07-28 13:21:00 +0900
commit25701f105b947500f920eb5a13e328f8f7843d38 (patch)
treede30a70073f9d7c3e11d173e3b224e6dbc6712bc
parent1e7d0d3ef627f3cdee70b8409f04d7e2ecf4fdd6 (diff)
downloadlibgpg-error-25701f105b947500f920eb5a13e328f8f7843d38.tar.gz
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 <gniibe@fsij.org>
-rw-r--r--src/estream.c6
1 files changed, 6 insertions, 0 deletions
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;