[Spice-devel] [PATCH spice-server] spicevmc: Fix g_object_new call for 32 bit machines
Victor Toso
victortoso at redhat.com
Tue Sep 24 15:19:39 UTC 2019
On Tue, Sep 24, 2019 at 04:00:27PM +0100, Frediano Ziglio wrote:
> "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>
> ---
> 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
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20190924/a3b9b022/attachment.sig>
More information about the Spice-devel
mailing list