aboutsummaryrefslogtreecommitdiffstats
path: root/g10/sign.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>1998-04-30 14:06:01 +0000
committerWerner Koch <[email protected]>1998-04-30 14:06:01 +0000
commit448f8e53fe3e5d5ac54fe7151e512acbb6114ad5 (patch)
tree5cb5878aaff2738558b1355f5f17b48d300cb145 /g10/sign.c
parentNEw (diff)
downloadgnupg-448f8e53fe3e5d5ac54fe7151e512acbb6114ad5.tar.gz
gnupg-448f8e53fe3e5d5ac54fe7151e512acbb6114ad5.zip
*** empty log message ***
Diffstat (limited to 'g10/sign.c')
-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 );