[totem] Properly use 64bit unsigned literal for connection-speed uint64 property
- From: Mario Sanchez Prada <msanchez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] Properly use 64bit unsigned literal for connection-speed uint64 property
- Date: Thu, 28 May 2015 09:55:53 +0000 (UTC)
commit 8c15325bc12740e94000d7b42a76c2a9b5896560
Author: Mario Sanchez Prada <mario endlessm com>
Date: Wed May 27 19:12:45 2015 +0100
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
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 0a1e45d..8512cf0 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]