diff options
Diffstat (limited to 'g10/encode.c')
-rw-r--r-- | g10/encode.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/g10/encode.c b/g10/encode.c index 8a0766674..6468ccfff 100644 --- a/g10/encode.c +++ b/g10/encode.c @@ -1,5 +1,6 @@ /* encode.c - encode data - * Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. + * Copyright (C) 1998, 1999, 2000, 2001, 2002, + * 2003 Free Software Foundation, Inc. * * This file is part of GnuPG. * @@ -291,7 +292,8 @@ encode_simple( const char *filename, int mode, int compat ) either partial length or fixed length with the new style messages. */ - if( filename && !opt.textmode ) { + if (filename && *filename && !(*filename == '-' && !filename[1]) + && !opt.textmode ) { off_t tmpsize; if ( !(tmpsize = iobuf_get_filelength(inp)) ) @@ -522,7 +524,8 @@ encode_crypt( const char *filename, STRLIST remusr ) } } - if( filename && !opt.textmode ) { + if (filename && *filename && !(*filename == '-' && !filename[1]) + && !opt.textmode ) { off_t tmpsize; if ( !(tmpsize = iobuf_get_filelength(inp)) ) |