diff options
author | Mario Sanchez Prada <mario@endlessm.com> | 2015-05-27 19:12:45 +0100 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2016-01-08 21:05:13 +0100 |
commit | 8b5afdb0a7f8a5c742e3023f1e032c7de8b2c7bd (patch) | |
tree | 0d0460e5f4ddc24c920d28c55e4342c47fc39bef | |
parent | 4bc0aad304bed0054c955d3e07b930811aad0858 (diff) | |
download | totem-gnome-3-14.tar.gz |
Properly use 64bit unsigned literal for connection-speed uint64 propertygnome-3-14
This avoids invalid memory reads in 32-bit systems when using a variable
list of arguments, as it's the case in g_object_set().
https://bugzilla.gnome.org/show_bug.cgi?id=749993
-rw-r--r-- | src/backend/bacon-video-widget.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/backend/bacon-video-widget.c b/src/backend/bacon-video-widget.c index 737ce0e1a..481b40abf 100644 --- a/src/backend/bacon-video-widget.c +++ b/src/backend/bacon-video-widget.c @@ -6069,7 +6069,9 @@ bacon_video_widget_initable_init (GInitable *initable, g_object_set (bvw->priv->play, "audio-filter", bvw->priv->audio_pitchcontrol, NULL); /* Set default connection speed */ - g_object_set (bvw->priv->play, "connection-speed", MAX_NETWORK_SPEED, NULL); + /* Cast the value to guint64 to match the type of the 'connection-speed' + * property to avoid problems reading variable arguments on 32-bit systems. */ + g_object_set (bvw->priv->play, "connection-speed", (guint64) MAX_NETWORK_SPEED, NULL); g_signal_connect (G_OBJECT (bvw->priv->play), "notify::volume", G_CALLBACK (notify_volume_cb), bvw); |