this actually wasn't a bug that would cause a crash. cloning an array
access would fail as the magic check would find its an accessor not an
array. indeed a bug... but we never used this anywhere i can find.
this was cast to the correct func ptr callabck in the accessor struct
as the clone method though.. thus everyhting was happy with it
seemingly.
found by PVS studio
@fix
}
static Eina_Accessor *
-eina_array_accessor_clone(const Eina_Array *array)
+eina_array_accessor_clone(const Eina_Accessor_Array *it)
{
Eina_Accessor_Array *ac;
- EINA_SAFETY_ON_NULL_RETURN_VAL(array, NULL);
- EINA_MAGIC_CHECK_ARRAY(array);
+ EINA_MAGIC_CHECK_ARRAY_ACCESSOR(it, NULL);
ac = calloc(1, sizeof (Eina_Accessor_Array));
if (!ac) return NULL;
- memcpy(ac, array, sizeof(Eina_Accessor_Array));
+ memcpy(ac, it, sizeof(Eina_Accessor_Array));
return &ac->accessor;
}