diff options
| author | Werner Koch <[email protected]> | 2019-04-03 09:26:14 +0000 |
|---|---|---|
| committer | Werner Koch <[email protected]> | 2019-04-03 09:26:14 +0000 |
| commit | 1f688e0d1dba4dd7a311d416d06d654ed7b4290d (patch) | |
| tree | 60ebaba398154bedf54541ffc4cb5cdd5ebd4415 | |
| parent | card: Allow card selection with LIST. (diff) | |
| download | gnupg-1f688e0d1dba4dd7a311d416d06d654ed7b4290d.tar.gz gnupg-1f688e0d1dba4dd7a311d416d06d654ed7b4290d.zip | |
gpg: Avoid endless loop if a card's serial number can't be read.
* g10/skclist.c (enum_secret_keys): Move list forward on error.
--
The error is not easy to reproduce but may occur if a card is removed
at the wrong time. Tested by changing the code.
Signed-off-by: Werner Koch <[email protected]>
| -rw-r--r-- | g10/skclist.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/g10/skclist.c b/g10/skclist.c index c9c41d0d9..ebbaba254 100644 --- a/g10/skclist.c +++ b/g10/skclist.c @@ -423,6 +423,7 @@ enum_secret_keys (ctrl_t ctrl, void **context, PKT_public_key *sk) if (opt.verbose) log_info (_("error getting serial number of card: %s\n"), gpg_strerror (err)); + c->sl = c->sl->next; continue; } |
