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.
This commit is contained in:
George Kiagiadakis
2019-09-22 18:14:43 +03:00
parent 9246eba803
commit 50e52b9e84
2 changed files with 4 additions and 4 deletions

View File

@@ -514,7 +514,7 @@ simple_endpoint_factory (WpFactory * factory, GType type,
g_autoptr (WpCore) core = NULL;
const gchar *name, *media_class;
guint direction;
WpProxy *node;
guint64 node;
/* Make sure the type is correct */
g_return_if_fail (type == WP_TYPE_ENDPOINT);
@@ -539,6 +539,6 @@ simple_endpoint_factory (WpFactory * factory, GType type,
"name", name,
"media-class", media_class,
"direction", direction,
"proxy-node", node,
"proxy-node", (gpointer) node,
NULL);
}

View File

@@ -385,7 +385,7 @@ endpoint_factory (WpFactory * factory, GType type, GVariant * properties,
g_autoptr (WpCore) core = NULL;
const gchar *name, *media_class;
guint direction;
WpProxy *node;
guint64 node;
g_autoptr (GVariant) streams = NULL;
/* Make sure the type is correct */
@@ -415,7 +415,7 @@ endpoint_factory (WpFactory * factory, GType type, GVariant * properties,
"name", name,
"media-class", media_class,
"direction", direction,
"proxy-node", node,
"proxy-node", (gpointer) node,
"streams", streams,
NULL);
}