aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Wild <ewild@sysmocom.de>2020-10-18 23:15:02 +0200
committerEric Wild <ewild@sysmocom.de>2020-10-18 23:17:00 +0200
commit099bb860b54031daa634a13a6d4520c207c42ac3 (patch)
tree72a48d953e38c08a0dc72ac4ce68eff0eec9c520
parentb06a90d43219da3a6961f3dae4e5dc8bd0c95fc4 (diff)
ccid: fix expected xfer length
-rw-r--r--ccid_common/ccid_slot_fsm.c3
1 files changed, 2 insertions, 1 deletions
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);