aboutsummaryrefslogtreecommitdiffstats
path: root/g10/plaintext.c
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2004-11-04 22:28:39 +0000
committerDavid Shaw <[email protected]>2004-11-04 22:28:39 +0000
commit69ef25f8d6c80af6748be5b311f1018e8625e7d2 (patch)
tree449f85017916691a788bfeb071728552ddc863ed /g10/plaintext.c
parent* misc.c (print_digest_algo_note): The latest 2440bis drafts deprecates (diff)
downloadgnupg-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 '')
-rw-r--r--g10/plaintext.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/g10/plaintext.c b/g10/plaintext.c
index a09e5e9e4..6eecb6944 100644
--- a/g10/plaintext.c
+++ b/g10/plaintext.c
@@ -105,13 +105,14 @@ handle_plaintext( PKT_plaintext *pt, md_filter_context_t *mfx,
if( nooutput )
;
- else if ( iobuf_is_pipe_filename (fname) ) {
+ else if ( iobuf_is_pipe_filename (fname) || !*fname)
+ {
/* No filename or "-" given; write to stdout. */
fp = stdout;
#ifdef HAVE_DOSISH_SYSTEM
setmode ( fileno(fp) , O_BINARY );
#endif
- }
+ }
else {
while( !overwrite_filep (fname) ) {
char *tmp = ask_outfile_name (NULL, 0);