[Spice-devel] [PATCH spice-server] spicevmc: Fix g_object_new call for 32 bit machines
Frediano Ziglio
fziglio at redhat.com
Tue Sep 24 15:00:27 UTC 2019
"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>
---
server/spicevmc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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,
NULL);
}
--
2.21.0
More information about the Spice-devel
mailing list