diff options
author | Kévin Redon <kredon@sysmocom.de> | 2018-10-15 19:47:41 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2018-10-21 12:29:26 +0000 |
commit | 7e5cda573228617dd04c1f722a3f054ffd69a878 (patch) | |
tree | 81b448e536c042def5c8346ed07d7326875a3cd7 | |
parent | 032fc5f844b08d9e395b135f396437193fd64db1 (diff) |
remsim: fix TPDU response size transmission
the TDPU response data size can be up to 256.
this length cannot be stored in a uint8_t, which would cause the
length to become 0, no data being send, and the reader reset the
card because of misbehaviour of the card (i.e. no/malformed
response leading to the timeout of the waiting time).
Change-Id: Iae7671085aaa3115a02d82530dd7a0e7e2d4155e
-rw-r--r-- | host/simtrace2-remsim.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/host/simtrace2-remsim.c b/host/simtrace2-remsim.c index d0bbb8c..73a7272 100644 --- a/host/simtrace2-remsim.c +++ b/host/simtrace2-remsim.c @@ -218,7 +218,7 @@ static int cardem_request_pb_and_rx(struct cardem_inst *ci, uint8_t pb, uint8_t /*! \brief Request the SIMtrace2 to transmit a Procedure Byte, then Tx */ static int cardem_request_pb_and_tx(struct cardem_inst *ci, uint8_t pb, - const uint8_t *data, uint8_t data_len_in) + const uint8_t *data, uint16_t data_len_in) { struct msgb *msg = st_msgb_alloc(); struct cardemu_usb_msg_tx_data *txd; |