ensure usb_msg_hdr contains raw message length

we want to ensure that the length of every (current or future) message
can be determined by looking at cardemu_usb_msg_hdr.msg_len, rather than
having a length that is relative to the respective specific command.
This commit is contained in:
Harald Welte
2016-03-18 21:01:36 +01:00
parent b8f9450c18
commit d295b92192
4 changed files with 21 additions and 12 deletions

View File

@@ -305,7 +305,7 @@ static void dispatch_usb_command(struct req_ctx *rctx, struct cardem_inst *ci)
break;
case CEMU_USB_MSGT_DT_SET_ATR:
atr = (struct cardemu_usb_msg_set_atr *) hdr;
card_emu_set_atr(ci->ch, atr->atr, hdr->data_len);
card_emu_set_atr(ci->ch, atr->atr, atr->atr_len);
req_ctx_put(rctx);
break;
case CEMU_USB_MSGT_DT_CARDINSERT: