From 1e013463ae73543e0029ef8c83f62756b6388ae6 Mon Sep 17 00:00:00 2001
From: Claus-Justus Heine <[EMAIL REDACTED]>
Date: Thu, 10 Nov 2022 13:45:08 +0000
Subject: [PATCH] tiff2pdf: Don't try to seek into stdout.
Fixes #441
---
tools/tiff2pdf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/tiff2pdf.c b/tools/tiff2pdf.c
index d742f38f..02236866 100644
--- a/tools/tiff2pdf.c
+++ b/tools/tiff2pdf.c
@@ -415,7 +415,7 @@ static uint64_t
t2p_seekproc(thandle_t handle, uint64_t offset, int whence)
{
T2P *t2p = (T2P*) handle;
- if (t2p->outputdisable <= 0 && t2p->outputfile)
+ if (t2p->outputdisable <= 0 && t2p->outputfile != stdout && t2p->outputfile)
return _TIFF_fseek_f(t2p->outputfile, (_TIFF_off_t) offset, whence);
return offset;
}