Skip to content
Snippets Groups Projects
Commit 50e52b9e authored by George Kiagiadakis's avatar George Kiagiadakis
Browse files

modules: fix reading proxy-node out GVariants

GVariant is instructed to store a 64-bit unsigned integer (mode "t")
but we pass it a pointer to a pointer to read this value out,
which will crash in 32-bit architectures, as the pointer doesn't have
enough bits and g_variant_lookup therefore corrupts the stack.
parent 9246eba8
No related branches found
No related tags found
No related merge requests found
...@@ -514,7 +514,7 @@ simple_endpoint_factory (WpFactory * factory, GType type, ...@@ -514,7 +514,7 @@ simple_endpoint_factory (WpFactory * factory, GType type,
g_autoptr (WpCore) core = NULL; g_autoptr (WpCore) core = NULL;
const gchar *name, *media_class; const gchar *name, *media_class;
guint direction; guint direction;
WpProxy *node; guint64 node;
/* Make sure the type is correct */ /* Make sure the type is correct */
g_return_if_fail (type == WP_TYPE_ENDPOINT); g_return_if_fail (type == WP_TYPE_ENDPOINT);
...@@ -539,6 +539,6 @@ simple_endpoint_factory (WpFactory * factory, GType type, ...@@ -539,6 +539,6 @@ simple_endpoint_factory (WpFactory * factory, GType type,
"name", name, "name", name,
"media-class", media_class, "media-class", media_class,
"direction", direction, "direction", direction,
"proxy-node", node, "proxy-node", (gpointer) node,
NULL); NULL);
} }
...@@ -385,7 +385,7 @@ endpoint_factory (WpFactory * factory, GType type, GVariant * properties, ...@@ -385,7 +385,7 @@ endpoint_factory (WpFactory * factory, GType type, GVariant * properties,
g_autoptr (WpCore) core = NULL; g_autoptr (WpCore) core = NULL;
const gchar *name, *media_class; const gchar *name, *media_class;
guint direction; guint direction;
WpProxy *node; guint64 node;
g_autoptr (GVariant) streams = NULL; g_autoptr (GVariant) streams = NULL;
/* Make sure the type is correct */ /* Make sure the type is correct */
...@@ -415,7 +415,7 @@ endpoint_factory (WpFactory * factory, GType type, GVariant * properties, ...@@ -415,7 +415,7 @@ endpoint_factory (WpFactory * factory, GType type, GVariant * properties,
"name", name, "name", name,
"media-class", media_class, "media-class", media_class,
"direction", direction, "direction", direction,
"proxy-node", node, "proxy-node", (gpointer) node,
"streams", streams, "streams", streams,
NULL); NULL);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment