elm app client - check return of eldbus_message_iter_arguments_get

as accoding to coverity CID 1353593 chekc returns of the above
function and return/continue as apporpriate if these fail (which
generallly they shouldnt unless some end of the dbus client is broken).
This commit is contained in:
Carsten Haitzler 2016-08-08 16:55:19 +09:00
parent e3e68f8ae0
commit 9d8c829c2f
1 changed files with 5 additions and 3 deletions

View File

@ -21,15 +21,17 @@ _sub_path_process(Elm_App_Client *eo, Eldbus_Message_Iter *obj_iter, Elm_App_Cli
const char *obj_path;
Eldbus_Message_Iter *array_iface, *iface;
eldbus_message_iter_arguments_get(obj_iter, "oa{sa{sv}}", &obj_path, &array_iface);
if (!eldbus_message_iter_arguments_get(obj_iter, "oa{sa{sv}}", &obj_path, &array_iface))
return;
while (eldbus_message_iter_get_and_next(array_iface, '{', &iface))
{
const char *iface_name;
Eldbus_Message_Iter *array_props;
Elm_App_Client_View *view;
eldbus_message_iter_arguments_get(iface, "sa{sv}", &iface_name,
&array_props);
if (!eldbus_message_iter_arguments_get(iface, "sa{sv}", &iface_name,
&array_props))
continue;
if (strcmp(iface_name, "org.enlightenment.ApplicationView1"))
continue;