diff options
author | Yonit Halperin <yhalperi@redhat.com> | 2012-06-24 20:33:19 +0300 |
---|---|---|
committer | Yonit Halperin <yhalperi@redhat.com> | 2012-07-03 14:13:40 +0300 |
commit | b468f14e23a54e0e502aba59d6aaf4e797339845 (patch) | |
tree | 2af97665d9bb690ed5999a77e6510e1fe5e40ef1 | |
parent | 3a4d54273b216063b483693dea29be10ff9b3c7e (diff) |
smartcard: fix calc of remaining data size when reading more than one msg from the device
-rw-r--r-- | server/smartcard.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/server/smartcard.c b/server/smartcard.c index 8ded142..cb6b40b 100644 --- a/server/smartcard.c +++ b/server/smartcard.c @@ -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); } |