[PATCH spice-server 2/3] fixup! StreamDevice: Handle incomplete reads of StreamMsgFormat

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

 



This fix a regression in message handling.
---
 server/stream-device.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/server/stream-device.c b/server/stream-device.c
index efa6d8db..0953a6d0 100644
--- a/server/stream-device.c
+++ b/server/stream-device.c
@@ -95,6 +95,7 @@ stream_device_read_msg_from_dev(RedCharDevice *self, SpiceCharDeviceInstance *si
         if (dev->hdr_pos >= sizeof(dev->hdr)) {
             dev->hdr.type = GUINT16_FROM_LE(dev->hdr.type);
             dev->hdr.size = GUINT32_FROM_LE(dev->hdr.size);
+            dev->msg_pos = 0;
         }
     }
 
-- 
2.14.3

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




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