gdbus-codegen code crashes with unknown interfaces
Submitted by Marius Vollmer
Assigned to David Zeuthen
Link to original bug (#723349)
Description
gdbus-codegen generates code like this:
static void lvm_object_notify (GDBusObject *object, GDBusInterface *interface) { g_object_notify (G_OBJECT (object), ((_ExtendedGDBusInterfaceInfo *) g_dbus_interface_get_info (interface))->hyphen_name); }
This relies on g_dbus_interface_get_info(interface) always returning a valid _ExtendedGDBusInterfaceInfo *. However, this is not guaranteed.
One example where this fails is when the generated object manager encounters a unknown interface and the get_proxy_type function returns G_TYPE_DBUS_PROXY.