1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

scd: Fix cmd_apdu on error.

* scd/command.c (cmd_apdu): Fix the code path on error.

--

GnuPG-bug-id: 6476
Reported-by: Robin Krahl
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka 2023-05-01 11:36:36 +09:00
parent 625bd92410
commit 3cf5fc2e2f
No known key found for this signature in database
GPG key ID: 640114AF89DE6054
2 changed files with 5 additions and 2 deletions

View file

@ -2200,7 +2200,10 @@ cmd_apdu (assuan_context_t ctx, char *line)
apdu, apdulen, handle_more,
NULL, &result, &resultlen);
if (rc)
log_error ("apdu_send_direct failed: %s\n", gpg_strerror (rc));
{
log_error ("apdu_send_direct failed: %s\n", apdu_strerror (rc));
rc = iso7816_map_sw (rc);
}
else
{
rc = assuan_send_data (ctx, result, resultlen);