aboutsummaryrefslogtreecommitdiffstats
path: root/g10/sign.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--g10/sign.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/g10/sign.c b/g10/sign.c
index 8867916c7..d804f576b 100644
--- a/g10/sign.c
+++ b/g10/sign.c
@@ -231,6 +231,14 @@ sign_file( STRLIST filenames, int detached, STRLIST locusr,
memcpy(pt->name, fname, pt->namelen );
if( !(filesize = iobuf_get_filelength(inp)) )
log_info("warning: '%s' is an empty file\n", fname );
+
+ /* because the text_filter modifies the length of the
+ * data, it is not possible to know the used length
+ * without a double read of the file - to avoid that
+ * we simple use partial length packets.
+ */
+ if( opt.textmode && !outfile )
+ filesize = 0;
}
else { /* no filename */
pt = m_alloc( sizeof *pt - 1 );