dtappbuilder: Further coverity, resource leaks, copy intofixed size buffer and dereference before null checl

This commit is contained in:
Peter Howkins
2018-04-28 02:51:10 +01:00
parent 0aa8780fa1
commit a135a89876
18 changed files with 82 additions and 44 deletions

View File

@@ -1197,13 +1197,14 @@ obj_verify(ABObj obj)
if (ok)
{
obj_str_ptr_name = istr_string(obj->name);
sprintf((STRING)obj_name, "(ABObj %#lx", (unsigned long) obj);
if (obj_str_ptr_name != NULL)
{
strcat((STRING)obj_name, " = ");
strcat((STRING)obj_name, obj_str_ptr_name);
snprintf((STRING)obj_name, sizeof(obj_name),
"(ABObj %#lx = %s)", (unsigned long) obj, obj_str_ptr_name);
} else {
snprintf((STRING)obj_name, sizeof(obj_name),
"(ABObj %#lx)", (unsigned long) obj);
}
strcat((STRING)obj_name, ")");
if (!ok)
{
field_err("name");