mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-29 17:07:15 +00:00
smartcard: Reset vheader value
The buffer could change inside smartcard_read_buf_prepare. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Victor Toso <victortoso@redhat.com>
This commit is contained in:
parent
60a61be549
commit
ebe676697f
@ -151,6 +151,7 @@ static RedPipeItem *smartcard_read_msg_from_device(RedCharDevice *self,
|
||||
continue;
|
||||
}
|
||||
smartcard_read_buf_prepare(dev, vheader);
|
||||
vheader = (VSCMsgHeader*)dev->priv->buf;
|
||||
}
|
||||
actual_length = ntohl(vheader->length);
|
||||
if (dev->priv->buf_used - sizeof(VSCMsgHeader) < actual_length) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user