diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2024-11-06 03:34:01 +0100 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2024-11-06 03:36:48 +0100 |
commit | 25a140542a9186a27b7df9cd3ca3d478b59cbf1b (patch) | |
tree | acabd9b600485138d7edcd3a0ced96c969293ac3 /scd | |
parent | po: Align German trustlist question to what we use in Kleopatra. (diff) | |
download | gnupg2-25a140542a9186a27b7df9cd3ca3d478b59cbf1b.tar.xz gnupg2-25a140542a9186a27b7df9cd3ca3d478b59cbf1b.zip |
scd: Serialize CARD access for send_card_and_app_list.
* scd/app.c (send_card_and_app_list): Lock the CARD.
--
GnuPG-bug-id: 7323
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
Diffstat (limited to 'scd')
-rw-r--r-- | scd/app.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -2776,9 +2776,14 @@ send_card_and_app_list (ctrl_t ctrl, card_t wantcard, int with_apps) for (n=0; n < ncardlist; n++) { - if (wantcard && wantcard != cardlist[n]) + card_t card = cardlist[n]; + + if (wantcard && wantcard != card) continue; - err = send_serialno_and_app_status (cardlist[n], with_apps, ctrl); + + lock_card (card, ctrl); + err = send_serialno_and_app_status (card, with_apps, ctrl); + unlock_card (card); if (err) goto leave; } |