diff options
author | Eric Wild <ewild@sysmocom.de> | 2020-10-18 23:15:02 +0200 |
---|---|---|
committer | Eric Wild <ewild@sysmocom.de> | 2020-10-18 23:17:00 +0200 |
commit | 099bb860b54031daa634a13a6d4520c207c42ac3 (patch) | |
tree | 72a48d953e38c08a0dc72ac4ce68eff0eec9c520 | |
parent | b06a90d43219da3a6961f3dae4e5dc8bd0c95fc4 (diff) |
ccid: fix expected xfer length
Closes: OS#4818
Change-Id: I41e13625ca7f85b1a14960a938e807bbbebf656a
-rw-r--r-- | ccid_common/ccid_slot_fsm.c | 3 |
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); |