mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2026-08-10 10:36:36 +00:00
server: Make sure g_object_new receive the correct data
g_object_new is a variadic function which takes property values. As the compiler cannot check if these property values are correct, make sure they are using casts. This actually fixes a crash in reds.c for 32 bit architectures. Based on a patch by Frediano Ziglio <fziglio@redhat.com> Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
This commit is contained in:
parent
4d2a129054
commit
29caba2d53
@ -4507,8 +4507,8 @@ static RedCharDeviceVDIPort *red_char_device_vdi_port_new(RedsState *reds)
|
||||
{
|
||||
return g_object_new(RED_TYPE_CHAR_DEVICE_VDIPORT,
|
||||
"spice-server", reds,
|
||||
"client-tokens-interval", REDS_TOKENS_TO_SEND,
|
||||
"self-tokens", REDS_NUM_INTERNAL_AGENT_MESSAGES,
|
||||
"client-tokens-interval", (guint64)REDS_TOKENS_TO_SEND,
|
||||
"self-tokens", (guint64)REDS_NUM_INTERNAL_AGENT_MESSAGES,
|
||||
"opaque", reds,
|
||||
NULL);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user