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:
@@ -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,
|
|||||||
"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,
|
|||||||
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,
|
|||||||
"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);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user