[PATCH spice-server 2/2] smartcard: Reset vheader value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The buffer could change inside smartcard_read_buf_prepare.

Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
---
 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

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]