connman agent - handle theoretical missing requirement and name strings

fix CID 1076319
This commit is contained in:
Carsten Haitzler 2019-08-06 19:29:46 +01:00
parent 52dde8d541
commit 78102717ae
1 changed files with 9 additions and 2 deletions

View File

@ -438,8 +438,15 @@ _agent_request_input(const Eldbus_Service_Interface *iface,
"\tAlternates: (omit array)\n"
"\tValue: %s",
field.name, field.type, field.requirement, field.value);
_dialog_field_add(agent, &field);
if (!field.requirement)
{
ERR("Field '%s' missing requirement string", field.name);
}
else if (!field.name)
{
ERR("Field missing name string");
}
else _dialog_field_add(agent, &field);
}
return NULL;