[Spice-commits] server/spicevmc.c

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Sep 24 15:23:29 UTC 2019

 server/spicevmc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit abbd985c780a3b4169b0130e7b8060725d358022
Author: Frediano Ziglio <fziglio at redhat.com>
Date:   Tue Sep 24 15:31:29 2019 +0100

    spicevmc: Fix g_object_new call for 32 bit machines
    "self-tokens" property is 64 bit and must be passed as 64 bit on
    32 bit machines to avoid memory corruptions.
    This was introduced by 01de3b8922 ("spicevmc: Avoids DoS if
    guest device is not able to get data faster enough"), detected by CI.
    It caused this error (split into multiple lines):
      (./test-leaks:15879): GLib-GObject-CRITICAL **: 14:03:59.650: \
      g_object_new_is_valid_property: object class 'RedCharDeviceSpiceVmc' has \
      no property named '\xb0/@\xf3\u0001'
    Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
    Acked-by: Victor Toso <victortoso at redhat.com>

diff --git a/server/spicevmc.c b/server/spicevmc.c
index f01d5416..325c3fe1 100644
--- a/server/spicevmc.c
+++ b/server/spicevmc.c
@@ -942,7 +942,7 @@ red_char_device_spicevmc_new(SpiceCharDeviceInstance *sin,
                         "sin", sin,
                         "spice-server", reds,
                         "client-tokens-interval", 0ULL,
-                        "self-tokens", 128, // limit number of messages sent to device
+                        "self-tokens", UINT64_C(128), // limit number of messages sent to device
                         "channel", channel,

More information about the Spice-commits mailing list