diff options
author | Werner Koch <[email protected]> | 2003-05-21 08:48:26 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2003-05-21 08:48:26 +0000 |
commit | d0573d3db60fd0d522da31a04e451f84a17618d3 (patch) | |
tree | bbd09de938e0d65994dd9aca1105954a328ae21b /g10/sign.c | |
parent | * cipher.c (setup_cipher_table): #ifdef IDEA. (diff) | |
download | gnupg-d0573d3db60fd0d522da31a04e451f84a17618d3.tar.gz gnupg-d0573d3db60fd0d522da31a04e451f84a17618d3.zip |
* progress.c (handle_progress)
* sign.c (write_plaintext_packet)
* encode.c (encode_simple,encode_crypt): Make sure that a filename
of "-" is considered to be stdin so that iobuf_get_filelength
won't get called. This fixes bug 156 reported by Gregery Barton.
Diffstat (limited to 'g10/sign.c')
-rw-r--r-- | g10/sign.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/g10/sign.c b/g10/sign.c index 852632098..6e6566048 100644 --- a/g10/sign.c +++ b/g10/sign.c @@ -1,5 +1,6 @@ /* sign.c - sign 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. * @@ -483,7 +484,7 @@ write_plaintext_packet (IOBUF out, IOBUF inp, const char *fname, int ptmode) } /* try to calculate the length of the data */ - if (fname) { + if (fname && *fname && !(*fname=='-' && !fname[1])) { if( !(filesize = iobuf_get_filelength(inp)) ) log_info (_("WARNING: `%s' is an empty file\n"), fname); |