Re: [spice-common] Fix type of SpiceCursorHeader::type

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

 



On 09/13/2012 06:53 PM, Christophe Fergeau wrote:
In spice.proto it's defined as enum8 cursor_type type;, which means
it's demarshalled as an uint8_t.
This caused valgrind warnings about using uninitialized memory
during a connection to a VM with remote-viewer
Hi Christophe,

Your patch looks good to me.
But note that in spice1.proto cursor_type is enum16.
It seems spice1.proto is only used by spice-client

Regards,
    Uri.


---
  common/draw.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/draw.h b/common/draw.h
index 3704358..00057eb 100644
--- a/common/draw.h
+++ b/common/draw.h
@@ -286,7 +286,7 @@ typedef struct SpiceText {

  typedef struct SpiceCursorHeader {
      uint64_t unique;
-    uint16_t type;
+    uint8_t  type;
      uint16_t width;
      uint16_t height;
      uint16_t hot_spot_x;

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://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]