summaryrefslogtreecommitdiffstats
path: root/g10/sign.c
diff options
context:
space:
mode:
Diffstat (limited to 'g10/sign.c')
-rw-r--r--g10/sign.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/g10/sign.c b/g10/sign.c
index d52010a4c..b53444b7c 100644
--- a/g10/sign.c
+++ b/g10/sign.c
@@ -485,6 +485,10 @@ sign_file( STRLIST filenames, int detached, STRLIST locusr,
if( fname ) {
if( !(filesize = iobuf_get_filelength(inp)) )
log_info(_("WARNING: `%s' is an empty file\n"), fname );
+ /* we can't yet encode the length of very large files,
+ * so we switch to partial length encoding in this case */
+ if ( filesize >= IOBUF_FILELENGTH_LIMIT )
+ filesize = 0;
/* because the text_filter modifies the length of the
* data, it is not possible to know the used length