Commit ee0745fe authored by Ludovic Ferrandis's avatar Ludovic Ferrandis Committed by Jens Georg
Browse files

Fix potential crashes in case of a bad parameter.

In both function, if type parameter is NULL, the call to
resource_type_match will crash as this function call strcmp on type
without any check.

https://bugzilla.gnome.org/show_bug.cgi?id=704094
parent fe9fb186
......@@ -1117,6 +1117,7 @@ gupnp_device_info_get_device (GUPnPDeviceInfo *info,
xmlNode *element;
g_return_val_if_fail (GUPNP_IS_DEVICE_INFO (info), NULL);
g_return_val_if_fail (type != NULL, NULL);
class = GUPNP_DEVICE_INFO_GET_CLASS (info);
......@@ -1271,6 +1272,7 @@ gupnp_device_info_get_service (GUPnPDeviceInfo *info,
xmlNode *element;
g_return_val_if_fail (GUPNP_IS_DEVICE_INFO (info), NULL);
g_return_val_if_fail (type != NULL, NULL);
class = GUPNP_DEVICE_INFO_GET_CLASS (info);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment