mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-18 14:17:03 +01: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
@ -1,3 +1,15 @@
|
|||||||
|
2004-11-04 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
|
* 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).
|
||||||
|
|
||||||
2004-11-03 David Shaw <dshaw@jabberwocky.com>
|
2004-11-03 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
* misc.c (print_digest_algo_note): The latest 2440bis drafts
|
* misc.c (print_digest_algo_note): The latest 2440bis drafts
|
||||||
|
@ -300,8 +300,8 @@ encode_simple( const char *filename, int mode, int use_seskey )
|
|||||||
either partial length or fixed length with the new style
|
either partial length or fixed length with the new style
|
||||||
messages. */
|
messages. */
|
||||||
|
|
||||||
if ( !iobuf_is_pipe_filename (filename) && filename && *filename
|
if ( !iobuf_is_pipe_filename (filename) && *filename && !opt.textmode )
|
||||||
&& !opt.textmode ) {
|
{
|
||||||
off_t tmpsize;
|
off_t tmpsize;
|
||||||
|
|
||||||
if ( !(tmpsize = iobuf_get_filelength(inp)) )
|
if ( !(tmpsize = iobuf_get_filelength(inp)) )
|
||||||
@ -596,8 +596,8 @@ encode_crypt( const char *filename, STRLIST remusr, int use_symkey )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!iobuf_is_pipe_filename (filename) && *filename
|
if (!iobuf_is_pipe_filename (filename) && *filename && !opt.textmode )
|
||||||
&& !opt.textmode ) {
|
{
|
||||||
off_t tmpsize;
|
off_t tmpsize;
|
||||||
|
|
||||||
if ( !(tmpsize = iobuf_get_filelength(inp)) )
|
if ( !(tmpsize = iobuf_get_filelength(inp)) )
|
||||||
|
@ -105,7 +105,8 @@ handle_plaintext( PKT_plaintext *pt, md_filter_context_t *mfx,
|
|||||||
|
|
||||||
if( nooutput )
|
if( nooutput )
|
||||||
;
|
;
|
||||||
else if ( iobuf_is_pipe_filename (fname) ) {
|
else if ( iobuf_is_pipe_filename (fname) || !*fname)
|
||||||
|
{
|
||||||
/* No filename or "-" given; write to stdout. */
|
/* No filename or "-" given; write to stdout. */
|
||||||
fp = stdout;
|
fp = stdout;
|
||||||
#ifdef HAVE_DOSISH_SYSTEM
|
#ifdef HAVE_DOSISH_SYSTEM
|
||||||
|
@ -105,7 +105,7 @@ handle_progress (progress_filter_context_t *pfx, IOBUF inp, const char *name)
|
|||||||
if (!is_status_enabled ())
|
if (!is_status_enabled ())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ( !iobuf_is_pipe_filename (name) && name && *name )
|
if ( !iobuf_is_pipe_filename (name) && *name )
|
||||||
filesize = iobuf_get_filelength (inp);
|
filesize = iobuf_get_filelength (inp);
|
||||||
else if (opt.set_filesize)
|
else if (opt.set_filesize)
|
||||||
filesize = opt.set_filesize;
|
filesize = opt.set_filesize;
|
||||||
|
@ -543,7 +543,8 @@ write_plaintext_packet (IOBUF out, IOBUF inp, const char *fname, int ptmode)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* try to calculate the length of the data */
|
/* 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;
|
off_t tmpsize;
|
||||||
|
|
||||||
if( !(tmpsize = iobuf_get_filelength(inp)) )
|
if( !(tmpsize = iobuf_get_filelength(inp)) )
|
||||||
@ -565,9 +566,8 @@ write_plaintext_packet (IOBUF out, IOBUF inp, const char *fname, int ptmode)
|
|||||||
if ( ptmode == 't' )
|
if ( ptmode == 't' )
|
||||||
filesize = 0;
|
filesize = 0;
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
filesize = opt.set_filesize? opt.set_filesize : 0; /* stdin */
|
filesize = opt.set_filesize? opt.set_filesize : 0; /* stdin */
|
||||||
}
|
|
||||||
|
|
||||||
if (!opt.no_literal) {
|
if (!opt.no_literal) {
|
||||||
PACKET pkt;
|
PACKET pkt;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user