[Spice-devel] [PATCH spice-server 2/2] smartcard: Reset vheader value
Frediano Ziglio
fziglio at redhat.com
Thu Oct 10 09:02:34 UTC 2019
The buffer could change inside smartcard_read_buf_prepare.
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
server/smartcard.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/server/smartcard.c b/server/smartcard.c
index d62847d60..961633f0e 100644
--- a/server/smartcard.c
+++ b/server/smartcard.c
@@ -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) {
--
2.21.0
More information about the Spice-devel
mailing list