From 099bb860b54031daa634a13a6d4520c207c42ac3 Mon Sep 17 00:00:00 2001 From: Eric Wild Date: Sun, 18 Oct 2020 23:15:02 +0200 Subject: ccid: fix expected xfer length Closes: OS#4818 Change-Id: I41e13625ca7f85b1a14960a938e807bbbebf656a --- ccid_common/ccid_slot_fsm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ccid_common/ccid_slot_fsm.c b/ccid_common/ccid_slot_fsm.c index 18aa61f..af5b713 100644 --- a/ccid_common/ccid_slot_fsm.c +++ b/ccid_common/ccid_slot_fsm.c @@ -298,7 +298,8 @@ static int iso_fsm_slot_xfr_block_async(struct ccid_slot *cs, struct msgb *msg, if (xfb->wLevelParameter != 0x0000) return -8; - if (msgb_length(msg) != xfb->hdr.dwLength) + /* ccid header is 10b */ + if (msgb_length(msg) != xfb->hdr.dwLength + 10) return -1; msgb_pull(msg, 10); -- cgit v1.2.3