diff options
author | Mario Sanchez Prada <mario@endlessm.com> | 2015-05-27 19:12:45 +0100 |
---|---|---|
committer | Mario Sanchez Prada <mario@endlessm.com> | 2015-05-28 10:51:01 +0100 |
commit | 8c15325bc12740e94000d7b42a76c2a9b5896560 (patch) | |
tree | 3a26c8b7985ff1d8d0feb768132e956cdc82eeb5 | |
parent | 5fac8c27ae80e5546e9993c59140b3e5a9dd21d4 (diff) | |
download | totem-8c15325bc12740e94000d7b42a76c2a9b5896560.tar.gz |
Properly use 64bit unsigned literal for connection-speed uint64 property
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 0a1e45d96..8512cf0c9 100644 --- a/src/backend/bacon-video-widget.c +++ b/src/backend/bacon-video-widget.c @@ -6096,7 +6096,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); |