[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 2/7] Retrieve the correct TD byte when checki
From: |
Marc-André Lureau |
Subject: |
Re: [Qemu-devel] [PATCH v3 2/7] Retrieve the correct TD byte when checking an ATR. |
Date: |
Wed, 25 Mar 2015 16:12:54 +0100 |
ACK.
Reviewed-by: Marc-André Lureau <address@hidden>
On Fri, Mar 13, 2015 at 8:45 PM, Jeremy White <address@hidden> wrote:
> A physical smartcard with an ATR of
> 3B 95 95 40 FF AE 01 0E 00 00
> was parsed incorrectly.
>
> The '40' should have been the second TD; instead
> the FF is used, incorrectly.
>
> Signed-off-by: Jeremy White <address@hidden>
> ---
> hw/usb/ccid-card-passthru.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/usb/ccid-card-passthru.c b/hw/usb/ccid-card-passthru.c
> index 10f1d30..2ae3b81 100644
> --- a/hw/usb/ccid-card-passthru.c
> +++ b/hw/usb/ccid-card-passthru.c
> @@ -168,8 +168,8 @@ static int check_atr(PassthruState *card, uint8_t *data,
> int len)
> opt_bytes++;
> }
> if (td & 0x8) {
> - opt_bytes++;
> td = data[opt_bytes + 2] >> 4;
> + opt_bytes++;
> }
> }
> if (len < 2 + historical_length + opt_bytes) {
> --
> 1.7.10.4
>
>
--
Marc-André Lureau
- Re: [Qemu-devel] [PATCH v3 3/7] Add a configure check for libpcsclite, and an option to enable or disable it., (continued)
- [Qemu-devel] [PATCH v3 4/7] Add error checking to vcard_emul_options., Jeremy White, 2015/03/13
- [Qemu-devel] [PATCH v3 5/7] Add a VCARD_DIRECT implemention to the libcacard smartcard support., Jeremy White, 2015/03/13
- [Qemu-devel] [PATCH v3 7/7] Remove the (broken) passthru option., Jeremy White, 2015/03/13
- [Qemu-devel] [PATCH v3 1/7] Bug fix: delete the reader entry after queueing an event, not before., Jeremy White, 2015/03/13
- [Qemu-devel] [PATCH v3 2/7] Retrieve the correct TD byte when checking an ATR., Jeremy White, 2015/03/13
- Re: [Qemu-devel] [PATCH v3 2/7] Retrieve the correct TD byte when checking an ATR.,
Marc-André Lureau <=
- Re: [Qemu-devel] [PATCH v3 0/7] Add support for passthru cards to libcacard, Patchew Tool, 2015/03/13
- Re: [Qemu-devel] [PATCH v3 0/7] Add support for passthru cards to libcacard, Marc-André Lureau, 2015/03/16