mirror of
https://gitea.osmocom.org/sim-card/simtrace2.git
synced 2026-03-17 05:38:33 +03:00
card_emu: Ensure the length is properly set on a TPDU header rctx
This commit is contained in:
@@ -506,7 +506,7 @@ static void send_tpdu_header(struct card_handle *ch)
|
||||
cardemu_hdr_set(&rd->hdr, CEMU_USB_MSGT_DO_RX_DATA);
|
||||
rd->flags = CEMU_DATA_F_TPDU_HDR;
|
||||
rctx->tot_len = sizeof(*rd) + sizeof(ch->tpdu.hdr);
|
||||
rctx->idx = 0;
|
||||
rctx->idx = sizeof(ch->tpdu.hdr);
|
||||
|
||||
/* copy TPDU header to data field */
|
||||
memcpy(rd->data, ch->tpdu.hdr, sizeof(ch->tpdu.hdr));
|
||||
|
||||
Reference in New Issue
Block a user