diff options
Diffstat (limited to 'g10/passphrase.c')
-rw-r--r-- | g10/passphrase.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/g10/passphrase.c b/g10/passphrase.c index fb4ec4c85..37abc0f1c 100644 --- a/g10/passphrase.c +++ b/g10/passphrase.c @@ -166,6 +166,9 @@ read_passphrase_from_fd( int fd ) int i, len; char *pw; + if (! gnupg_fd_valid (fd)) + log_fatal ("passphrase-fd is invalid: %s\n", strerror (errno)); + if ( !opt.batch && opt.pinentry_mode != PINENTRY_MODE_LOOPBACK) { /* Not used but we have to do a dummy read, so that it won't end up at the begin of the message if the quite usual trick to |