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 <wk@gnupg.org>
This commit is contained in:
Werner Koch 2019-04-03 11:26:14 +02:00
parent bcca3acb87
commit 1f688e0d1d
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B
1 changed files with 1 additions and 0 deletions

View File

@ -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;
}