diff options
author | David Shaw <[email protected]> | 2004-11-04 22:28:39 +0000 |
---|---|---|
committer | David Shaw <[email protected]> | 2004-11-04 22:28:39 +0000 |
commit | 69ef25f8d6c80af6748be5b311f1018e8625e7d2 (patch) | |
tree | 449f85017916691a788bfeb071728552ddc863ed /g10/sign.c | |
parent | * misc.c (print_digest_algo_note): The latest 2440bis drafts deprecates (diff) | |
download | gnupg-69ef25f8d6c80af6748be5b311f1018e8625e7d2.tar.gz gnupg-69ef25f8d6c80af6748be5b311f1018e8625e7d2.zip |
* plaintext.c (handle_plaintext): Don't try and create a zero-length
filename when using --use-embedded-filename with input that has no
filename (clearsigned or message generated from a pipe).
* encode.c (encode_simple, encode_crypt), progress.c (handle_progress),
sign.c (write_plaintext_packet): Fix a few inconsistent calls (NULL
filename means a pipe here, so don't bother to check it twice).
Diffstat (limited to 'g10/sign.c')
-rw-r--r-- | g10/sign.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/g10/sign.c b/g10/sign.c index ee0d99f39..9777d0553 100644 --- a/g10/sign.c +++ b/g10/sign.c @@ -543,11 +543,12 @@ write_plaintext_packet (IOBUF out, IOBUF inp, const char *fname, int ptmode) } /* try to calculate the length of the data */ - if ( !iobuf_is_pipe_filename (fname) && fname && *fname ) { + if ( !iobuf_is_pipe_filename (fname) && *fname ) + { off_t tmpsize; if( !(tmpsize = iobuf_get_filelength(inp)) ) - log_info (_("WARNING: `%s' is an empty file\n"), fname); + log_info (_("WARNING: `%s' is an empty file\n"), fname); /* We can't encode the length of very large files because OpenPGP uses only 32 bit for file sizes. So if the size of @@ -563,11 +564,10 @@ write_plaintext_packet (IOBUF out, IOBUF inp, const char *fname, int ptmode) * without a double read of the file - to avoid that * we simple use partial length packets. */ if ( ptmode == 't' ) - filesize = 0; - } - else { - filesize = opt.set_filesize? opt.set_filesize : 0; /* stdin */ - } + filesize = 0; + } + else + filesize = opt.set_filesize? opt.set_filesize : 0; /* stdin */ if (!opt.no_literal) { PACKET pkt; |