mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
* 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).
This commit is contained in:
parent
c09b34fede
commit
69ef25f8d6
5 changed files with 31 additions and 18 deletions
16
g10/encode.c
16
g10/encode.c
|
@ -300,8 +300,8 @@ encode_simple( const char *filename, int mode, int use_seskey )
|
|||
either partial length or fixed length with the new style
|
||||
messages. */
|
||||
|
||||
if ( !iobuf_is_pipe_filename (filename) && filename && *filename
|
||||
&& !opt.textmode ) {
|
||||
if ( !iobuf_is_pipe_filename (filename) && *filename && !opt.textmode )
|
||||
{
|
||||
off_t tmpsize;
|
||||
|
||||
if ( !(tmpsize = iobuf_get_filelength(inp)) )
|
||||
|
@ -314,9 +314,9 @@ encode_simple( const char *filename, int mode, int use_seskey )
|
|||
filesize = tmpsize;
|
||||
else
|
||||
filesize = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
filesize = opt.set_filesize ? opt.set_filesize : 0; /* stdin */
|
||||
filesize = opt.set_filesize ? opt.set_filesize : 0; /* stdin */
|
||||
|
||||
if (!opt.no_literal) {
|
||||
pt->timestamp = make_timestamp();
|
||||
|
@ -596,8 +596,8 @@ encode_crypt( const char *filename, STRLIST remusr, int use_symkey )
|
|||
}
|
||||
}
|
||||
|
||||
if (!iobuf_is_pipe_filename (filename) && *filename
|
||||
&& !opt.textmode ) {
|
||||
if (!iobuf_is_pipe_filename (filename) && *filename && !opt.textmode )
|
||||
{
|
||||
off_t tmpsize;
|
||||
|
||||
if ( !(tmpsize = iobuf_get_filelength(inp)) )
|
||||
|
@ -610,9 +610,9 @@ encode_crypt( const char *filename, STRLIST remusr, int use_symkey )
|
|||
filesize = tmpsize;
|
||||
else
|
||||
filesize = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
filesize = opt.set_filesize ? opt.set_filesize : 0; /* stdin */
|
||||
filesize = opt.set_filesize ? opt.set_filesize : 0; /* stdin */
|
||||
|
||||
if (!opt.no_literal) {
|
||||
pt->timestamp = make_timestamp();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue