mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2026-08-07 16:29:29 +00:00
smartcard: fix calc of remaining data size when reading more than one msg from the device
This commit is contained in:
parent
3a4d54273b
commit
b468f14e23
@ -107,7 +107,7 @@ void smartcard_char_device_wakeup(SpiceCharDeviceInstance *sin)
|
||||
continue;
|
||||
}
|
||||
smartcard_char_device_on_message_from_device(state, vheader);
|
||||
remaining = state->buf_used - sizeof(VSCMsgHeader) > actual_length;
|
||||
remaining = state->buf_used - sizeof(VSCMsgHeader) - actual_length;
|
||||
if (remaining > 0) {
|
||||
memcpy(state->buf, state->buf_pos, remaining);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user