On 2026-08-05 13:50, Marc-André Lureau wrote:
The CCID Rev 1.1 specification states in section 1.3, Document
Conventions, that fields larger than one byte are stored in
little-endian format. The bulk message header's dwLength field is a
four-byte field described in section 6, CCID Messages.

Decode dwLength with le32_to_cpu() before using it to assemble and
validate Bulk-OUT messages. This fixes message handling on big-endian
hosts.

Signed-off-by: Marc-André Lureau <[email protected]>
---
  hw/usb/dev-smartcard-reader.c | 10 ++++++----
  1 file changed, 6 insertions(+), 4 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <[email protected]>

Reply via email to